@xylabs/axios
v5.0.90
Published
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
Readme
@xylabs/axios
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
Reference
@xylabs/axios
Classes
| Class | Description | | ------ | ------ | | ~~AxiosJson~~ | - |
Variables
| Variable | Description | | ------ | ------ | | axiosJson | - | | ~~axios~~ | - |
Functions
| Function | Description |
| ------ | ------ |
| axiosJsonConfig | Creates an Axios config preconfigured for JSON requests with optional gzip compression. Request bodies exceeding compressLength (default 1024 bytes) are automatically gzip-compressed. |
classes
AxiosJson
Deprecated
use axiosJsonConfig instead
Extends
Axios
Constructors
Constructor
new AxiosJson(config?: RawAxiosJsonRequestConfig): AxiosJson;Parameters
| Parameter | Type |
| ------ | ------ |
| config? | RawAxiosJsonRequestConfig |
Returns
AxiosJson
Overrides
Axios.constructorMethods
~~axiosConfig()~~
static axiosConfig(config?: RawAxiosJsonRequestConfig): RawAxiosJsonRequestConfig;Parameters
| Parameter | Type |
| ------ | ------ |
| config | RawAxiosJsonRequestConfig |
Returns
RawAxiosJsonRequestConfig
~~create()~~
static create(config?: RawAxiosJsonRequestConfig): Axios;Parameters
| Parameter | Type |
| ------ | ------ |
| config? | RawAxiosJsonRequestConfig |
Returns
Axios
functions
axiosJsonConfig
function axiosJsonConfig(config?: RawAxiosJsonRequestConfig): RawAxiosJsonRequestConfig;Creates an Axios config preconfigured for JSON requests with optional gzip compression.
Request bodies exceeding compressLength (default 1024 bytes) are automatically gzip-compressed.
Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| config | RawAxiosJsonRequestConfig | Base Axios config, optionally including a compressLength threshold |
Returns
RawAxiosJsonRequestConfig
A fully configured Axios request config with JSON transforms
variables
axios
const axios: Axios = axiosJson;Deprecated
use axiosJson instead
axiosJson
const axiosJson: Axios;Part of sdk-js
Maintainers
License
See the LICENSE file for license details
