rest-vir - v1.0.0
Preparing search index...
buildEndpointUrl
Function buildEndpointUrl
buildEndpointUrl
<
const
EndpointToFetch
extends
|
typeof
NoParam
|
Readonly
<
{
methods
:
_RequireAtLeastOne
<
Record
<
HttpMethod
,
boolean
>
,
HttpMethod
>
;
path
:
`
/
${
string
}
`
;
requestDataShape
:
undefined
|
ShapeDefinition
<
any
,
true
>
;
responseDataShape
:
undefined
|
ShapeDefinition
<
any
,
true
>
;
searchParamsShape
:
undefined
|
ShapeDefinition
<
unknown
,
true
>
;
service
:
{
serviceName
:
string
;
serviceOrigin
:
string
}
;
}
,
>
=
typeof
NoParam
,
>
(
endpoint
:
EndpointToFetch
extends
EndpointDefinition
?
EndpointToFetch
<
EndpointToFetch
>
:
{
methods
:
_RequireAtLeastOne
<
Record
<
HttpMethod
,
boolean
>
,
HttpMethod
>
;
path
:
`
/
${
string
}
`
;
requestDataShape
:
undefined
|
ShapeDefinition
<
any
,
true
>
;
responseDataShape
:
undefined
|
ShapeDefinition
<
any
,
true
>
;
searchParamsShape
:
undefined
|
ShapeDefinition
<
unknown
,
true
>
;
service
:
{
serviceName
:
string
;
serviceOrigin
:
string
}
;
}
,
__namedParameters
:
Pick
<
EndpointToFetch
extends
NoParam
?
Readonly
<
GenericFetchEndpointParams
>
:
Readonly
<
FetchEndpointParams
<
Exclude
<
EndpointToFetch
,
NoParam
>
>
>
,
"pathParams"
|
"searchParams"
,
>
,
)
:
string
Creates and finalizes a URL for sending fetches to the given endpoint.
Type Parameters
const
EndpointToFetch
extends
|
typeof
NoParam
|
Readonly
<
{
methods
:
_RequireAtLeastOne
<
Record
<
HttpMethod
,
boolean
>
,
HttpMethod
>
;
path
:
`
/
${
string
}
`
;
requestDataShape
:
undefined
|
ShapeDefinition
<
any
,
true
>
;
responseDataShape
:
undefined
|
ShapeDefinition
<
any
,
true
>
;
searchParamsShape
:
undefined
|
ShapeDefinition
<
unknown
,
true
>
;
service
:
{
serviceName
:
string
;
serviceOrigin
:
string
}
;
}
,
>
=
typeof
NoParam
Parameters
endpoint
:
EndpointToFetch
extends
EndpointDefinition
?
EndpointToFetch
<
EndpointToFetch
>
:
{
methods
:
_RequireAtLeastOne
<
Record
<
HttpMethod
,
boolean
>
,
HttpMethod
>
;
path
:
`
/
${
string
}
`
;
requestDataShape
:
undefined
|
ShapeDefinition
<
any
,
true
>
;
responseDataShape
:
undefined
|
ShapeDefinition
<
any
,
true
>
;
searchParamsShape
:
undefined
|
ShapeDefinition
<
unknown
,
true
>
;
service
:
{
serviceName
:
string
;
serviceOrigin
:
string
}
;
}
__namedParameters
:
Pick
<
EndpointToFetch
extends
NoParam
?
Readonly
<
GenericFetchEndpointParams
>
:
Readonly
<
FetchEndpointParams
<
Exclude
<
EndpointToFetch
,
NoParam
>
>
>
,
"pathParams"
|
"searchParams"
,
>
Returns
string
Package
@rest-vir/define-service
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
rest-vir - v1.0.0
Loading...
Creates and finalizes a URL for sending fetches to the given endpoint.