Http
Index
Constructors
Methods
Constructors
constructor
Returns Http
Methods
publicstaticdelete
Issues a DELETE HTTP request
Type parameters
- R
Parameters
absoluteUrl: string | URL
Absolute url
responseconverter: (r: Response) => TypedResponse<R>
How response should be converted. Use functions on HttpResponseType
optionalinit: HttpRequestInit
Optional HttpRequestInit values.
Returns Promise<TypedResponse<R>>
publicstaticfetch
Issues a HTTP request
Type parameters
- R
Parameters
method: HttpMethod
Method of http request.
absoluteUrl: string | URL
Absolute url
responseconverter: (r: Response) => TypedResponse<R>
How response should be converted. Use functions on HttpResponseType
optionalinit: HttpRequestInit
Optional HttpRequestInit values.
Returns Promise<TypedResponse<R>>
publicstaticget
Issues a GET HTTP request
Type parameters
- R
Parameters
absoluteUrl: string | URL
Absolute url
responseconverter: (r: Response) => TypedResponse<R>
How response should be converted. Use functions on HttpResponseType
optionalinit: HttpRequestInit
Optional HttpRequestInit values.
Returns Promise<TypedResponse<R>>
publicstaticpatch
Issues a PATCH HTTP request
Type parameters
- R
Parameters
absoluteUrl: string | URL
Absolute url
responseconverter: (r: Response) => TypedResponse<R>
How response should be converted. Use functions on HttpResponseType
optionalinit: HttpRequestInit
Optional HttpRequestInit values.
Returns Promise<TypedResponse<R>>
publicstaticpost
Issues a POST HTTP request
Type parameters
- R
Parameters
absoluteUrl: string | URL
Absolute url
responseconverter: (r: Response) => TypedResponse<R>
How response should be converted. Use functions on HttpResponseType
optionalinit: HttpRequestInit
Optional HttpRequestInit values.
Returns Promise<TypedResponse<R>>
publicstaticput
Issues a PUT HTTP request
Type parameters
- R
Parameters
absoluteUrl: string | URL
Absolute url
responseconverter: (r: Response) => TypedResponse<R>
How response should be converted. Use functions on HttpResponseType
optionalinit: HttpRequestInit
Optional HttpRequestInit values.
Returns Promise<TypedResponse<R>>
publicstaticsetAuthorizationHeaderProvider
Parameters
authorizationHeaderProvider: AuthorizationHeaderProvider
Returns void
Utility class for making HTTP requests. If requests are made to the Twinfinity backend then correct headers are automatically set.