rest-vir - v1.0.0
Preparing search index...
buildEndpointRequestInit
Function buildEndpointRequestInit
buildEndpointRequestInit
<
const
EndpointToFetch
extends
|
typeof
NoParam
|
Readonly
<
{
methods
:
_RequireAtLeastOne
<
Record
<
HttpMethod
,
boolean
>
,
HttpMethod
>
;
path
:
`
/
${
string
}
`
;
requestDataShape
:
undefined
|
ShapeDefinition
<
any
,
true
>
;
responseDataShape
:
undefined
|
ShapeDefinition
<
any
,
true
>
;
service
:
{
serviceName
:
string
;
serviceOrigin
:
string
}
;
}
,
>
,
>
(
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
:
CollapsedFetchEndpointParams
<
EndpointToFetch
,
false
>
,
)
:
{
requestInit
:
RequestInit
;
url
:
string
}
Build request init and URL for fetching an endpoint. Used in
fetchEndpoint
.
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
>
;
service
:
{
serviceName
:
string
;
serviceOrigin
:
string
}
;
}
,
>
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
:
CollapsedFetchEndpointParams
<
EndpointToFetch
,
false
>
Returns
{
requestInit
:
RequestInit
;
url
:
string
}
Package
@rest-vir/define-service
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
rest-vir - v1.0.0
Loading...
Build request init and URL for fetching an endpoint. Used in fetchEndpoint.