Simple request class that make use of the AMAZING axios under the hood. The goal of this package is more to keep a single implementation for futur updates than anything else.
-
url *
The url of the request
-
baseUrl
Specify the base url to call like "https://api.github.com/2.0" for example. If the "url" setting is absolute, this setting will don't have any impact on your request...
-
method
The request method to use like GET, DELETE, HEAD, POST, OPTIONS, PUT or PATCH
-
headers
Specify some headers to add to the request
-
params
Specify some params to be sent through the URL. Must be a plain object or a URLSearchParams object
-
data
Specify some data you want to send with the request. This setting is available only for `PUT`, `POST`, and `PATCH` requests...
-
timeout
Specify time to wait before aborting the actual request. If setted in number format, this will mean milliseconds.
-
transformRequest
Allows changes to the request data before it is sent to the server. See [axios](https://github.com/axios/axios#response-schema) documentation for more.
-
transformResponse
Allows changes to the response data to be made before it is passed to then/catch. See [axios](https://github.com/axios/axios#response-schema) documentation for more.
-
paramsSerializer
An optional function in charge of serializing. See [axios](https://github.com/axios/axios#response-schema) documentation for more.
-
withCredentials
Indicates whether or not cross-site Access-Control requests should be made using credentials. See [axios](https://github.com/axios/axios#response-schema) documentation for more.
-
auth
indicates that HTTP Basic auth should be used, and supplies credentials. See [axios](https://github.com/axios/axios#response-schema) documentation for more.
-
responseType
Indicates encoding to use for decoding responses (Node.js only)
-
responseEncoding
indicates encoding to use for decoding responses (Node.js only). See [axios](https://github.com/axios/axios#response-schema) documentation for more.
-
xsrfCookieName
The name of the cookie to use as a value for xsrf token
-
xsrfHeaderName
The name of the http header that carries the xsrf token value
-
onUploadProgress
Allows handling of progress events for uploads browser only
-
onDownloadProgress
Allows handling of progress events for downloads browser only
-
maxContentLength
Defines the max size of the http response content in bytes allowed in node.js
-
maxBodyLength
(Node only option) defines the max size of the http request content in bytes allowed
-
validateStatus
Defines whether to resolve or reject the promise for a give HTTP response status code. See [axios](https://github.com/axios/axios#response-schema) documentation for more.
-
maxRedirects
Defines the maximum number of redirects to follow in node.js
-
socketPath
Defines a UNIX Socket to be used in node.js. See [axios](https://github.com/axios/axios#response-schema) documentation for more.
-
httpAgent
Define a custom agent to be used when performing http. See [axios](https://github.com/axios/axios#response-schema) documentation for more.
-
httpsAgent
Define a custom agent to be used when performing https. See [axios](https://github.com/axios/axios#response-schema) documentation for more.
-
proxy
Defines the hostname, port, and protocol of the proxy server. See [axios](https://github.com/axios/axios#response-schema) documentation for more.
-
cancelToken
Specifies a cancel token that can be used to cancel the request. See [axios](https://github.com/axios/axios#response-schema) documentation for more.
-
signal
an alternative way to cancel Axios requests using AbortController
-
decompress
indicates whether or not the response body should be decompressed automatically. See [axios](https://github.com/axios/axios#response-schema) documentation for more.
-
insecureHTTPParser
Indicates where to use an insecure HTTP parser that accepts invalid HTTP headers. See [axios](https://github.com/axios/axios#response-schema) documentation for more.