Skip to main content

http.Client

Properties#

id#

id: number

Defined in: http.ts:122

Methods#

delete#

delete<T>(url: string, options?: RequestOptions): Promise<Response<T>>

Makes a DELETE request.

Type parameters:#

Name
T

Parameters:#

NameTypeDescription
urlstringThe request URL.
options?RequestOptionsThe request options.

Returns: Promise<Response<T>>

A promise resolving to the response.

Defined in: http.ts:239


drop#

drop(): Promise<void>

Drops the client instance.

Returns: Promise<void>

Defined in: http.ts:133


get#

get<T>(url: string, options?: RequestOptions): Promise<Response<T>>

Makes a GET request.

Type parameters:#

Name
T

Parameters:#

NameTypeDescription
urlstringThe request URL.
options?RequestOptionsThe request options.

Returns: Promise<Response<T>>

A promise resolving to the response.

Defined in: http.ts:167


patch#

patch<T>(url: string, options?: RequestOptions): Promise<Response<T>>

Makes a PATCH request.

Type parameters:#

Name
T

Parameters:#

NameTypeDescription
urlstringThe request URL.
options?RequestOptionsThe request options.

Returns: Promise<Response<T>>

A promise resolving to the response.

Defined in: http.ts:224


post#

post<T>(url: string, body?: Body, options?: RequestOptions): Promise<Response<T>>

Makes a POST request.

Type parameters:#

Name
T

Parameters:#

NameTypeDescription
urlstringThe request URL.
body?BodyThe body of the request.
options?RequestOptionsThe request options.

Returns: Promise<Response<T>>

A promise resolving to the response.

Defined in: http.ts:183


put#

put<T>(url: string, body?: Body, options?: RequestOptions): Promise<Response<T>>

Makes a PUT request.

Type parameters:#

Name
T

Parameters:#

NameTypeDescription
urlstringThe request URL.
body?BodyThe body of the request.
options?RequestOptionsRequest options.

Returns: Promise<Response<T>>

A promise resolving to the response.

Defined in: http.ts:204


request#

request<T>(options: HttpOptions): Promise<Response<T>>

Makes an HTTP request.

Type parameters:#

Name
T

Parameters:#

NameTypeDescription
optionsHttpOptionsThe request options.

Returns: Promise<Response<T>>

A promise resolving to the response.

Defined in: http.ts:149