Edit

Share via


INetworkModule interface

Client network interface to send backend requests.

Methods

sendGetRequestAsync<T>(string, NetworkRequestOptions, number)

Interface function for async network "GET" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/

sendPostRequestAsync<T>(string, NetworkRequestOptions)

Interface function for async network "POST" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/

Method Details

sendGetRequestAsync<T>(string, NetworkRequestOptions, number)

Interface function for async network "GET" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/

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

Parameters

url

string

timeout

number

Returns

Promise<NetworkResponse<T>>

sendPostRequestAsync<T>(string, NetworkRequestOptions)

Interface function for async network "POST" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/

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

Parameters

url

string

Returns

Promise<NetworkResponse<T>>