Send authenticated HTTP requests in RunJS. Requests automatically include the current app's baseURL, token, cookies, etc.
RequestOptions extends Axios AxiosRequestConfig:
url, method, params, data, etc.) are supported. URLs can use resource style (e.g. users:list, posts:update).| Parameter | Type | Description |
|---|---|---|
url | string | Request URL, can be resource style like users:list, posts:update |
method | 'get' | 'post' | 'put' | 'patch' | 'delete' | HTTP method, default 'get' |
params | object | Query params serialized into URL |
data | any | Request body for post/put/patch |
headers | object | Custom headers |
skipNotify | boolean | (error) => boolean | When true or function returns true, skip global error message |
skipAuth | boolean | When true, request failure (e.g. 401) won't trigger auth redirect |
Use a full URL to call another domain. The target service must enable CORS.