INetworkModule interface
Client network interface to send backend requests.
Methods
send |
Interface function for async network "GET" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/ |
send |
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
- options
- NetworkRequestOptions
- 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
- options
- NetworkRequestOptions
Returns
Promise<NetworkResponse<T>>