Upravit

Sdílet prostřednictvím


XhrClient class

This client implements the XMLHttpRequest class to send GET and POST requests.

Methods

sendGetRequestAsync<T>(string, NetworkRequestOptions)

XhrClient for REST endpoints - Get request

sendPostRequestAsync<T>(string, NetworkRequestOptions)

XhrClient for REST endpoints - Post request

Method Details

sendGetRequestAsync<T>(string, NetworkRequestOptions)

XhrClient 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)

XhrClient for REST endpoints - Post request

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

Parameters

url

string

options

NetworkRequestOptions

Returns

Promise<NetworkResponse<T>>