Endpoint
Sourceimport { Endpoint } from "@prestojs/rest";
Endpoint<ReturnT = any>
Constructor
Params:
Parameter | Type | Description | |
---|---|---|---|
* | urlPattern | UrlPattern | |
options An object with the properties below | |||
options.baseUrl | string | ||
options.decodeBody | |||
options.getMiddleware | |||
options.middleware | (|)[] | ||
options.resolveUrl | |||
... | any | Any properties from ExecuteInitOptions |
Methods
Params:
Parameter | Type | Description | |
---|---|---|---|
options An object with the properties below | |||
... | any | Any properties from ExecuteInitOptions | |
... | any | Any properties from UrlResolveOptions |
Returns:Promise
Params:
Parameter | Type | Description | |
---|---|---|---|
* | url | string | |
* | requestInit | undefined|RequestInit |
Returns:Promise
Params:
Parameter | Type | Description | |
---|---|---|---|
options An object with the properties below | |||
... | any | Any properties from ExecuteInitOptions | |
... | any | Any properties from UrlResolveOptions |
Returns:PreparedAction
Params:
Parameter | Type | Description | |
---|---|---|---|
* | urlPattern | UrlPattern | |
* | urlArgs | Record | |
* | query | undefined|Query | |
* | baseUrl | string |
Returns:string
Properties
baseUrl
Sourcemiddleware
SourcerequestInit
SourceStatic Properties
defaultConfig
SourceAn object with these properties: | |||
---|---|---|---|
Property | Type | Description | |
* | baseUrl | string | |
* | getMiddleware | ||
* | middleware | (|)[] | |
* | requestInit | RequestInit |