ulteam-scripts WebResponse
WebResponse class
Work with the Response object of the fetch API.
Methods
Name | Returns | Static | Description |
---|---|---|---|
get<TData>(response: Response) | Promise<IWebResponse<TData>> | Static |
Parse response payload and return IWebResponse object as a result. response: Fetch API response |
getDefault<TData>(type: WebResponseDefaultType, data: TData) | IWebResponse<TData> | Static |
Get IWebResponse object based on response type and data object. type: IWebResponse type data: Payload data |