Editar

Compartilhar via


FetchClient class

This class implements the Fetch API for GET and POST requests. See more here: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API

Methods

sendGetRequestAsync<T>(string, NetworkRequestOptions)

Fetch Client for REST endpoints - Get request

sendPostRequestAsync<T>(string, NetworkRequestOptions)

Fetch Client for REST endpoints - Post request

Method Details

sendGetRequestAsync<T>(string, NetworkRequestOptions)

Fetch Client for REST endpoints - Get request

function sendGetRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<NetworkResponse<T>>

Parameters

url

string

options

NetworkRequestOptions

Returns

Promise<NetworkResponse<T>>

sendPostRequestAsync<T>(string, NetworkRequestOptions)

Fetch Client for REST endpoints - Post request

function sendPostRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<NetworkResponse<T>>

Parameters

url

string

options

NetworkRequestOptions

Returns

Promise<NetworkResponse<T>>