HTTP Request
sendGetRequest
Method allowing to send a GET request.
Parameter | Type | Description |
---|---|---|
url | string | Url of the targeted request. |
config | HttpRequestConfig | Request configuration. |
config
Name | Type | Description |
---|---|---|
adapter | AxiosAdapter | |
auth | AxiosBasicCredentials | |
baseURL | string | |
cancelToken | CancelToken | |
data | any | |
decompress | boolean | |
headers | AxiosRequestHeaders | |
httpAgent | any | |
httpsAgent | any | |
insecureHTTPParser | boolean | |
maxBodyLength | number | |
maxContentLength | number | |
maxRedirects | number | |
method | Method | |
onDownloadProgress | function | |
onUploadProgress | function | |
params | any | |
paramsSerializer | function | |
proxy | AxiosProxyConfig / false | |
responseEncoding | function | |
responseType | ResponseType | |
signal | AbortSignal | |
socketPath | function | |
responseEncoding | responseEncoding / string | |
socketPath | function | |
timeout | number | |
timeoutErrorMessage | string | |
transformRequest | AxiosRequestTransformer / AxiosRequestTransformer[] | |
transformResponse | AxiosResponseTransformer / AxiosResponseTransformer[] | |
transitional | TransitionalOptions | |
url | string | |
validateStatus | function | |
withCredentials | boolean | |
xsrfCookieName | string | |
xsrfHeaderName | string |
Basic Usage
await I.sendGetRequest("https://my-website.com/api/v1");
sendDeleteRequest
Method allowing to send a DELETE request.
Parameter | Type | Description |
---|---|---|
url | string | Url of the targeted request. |
config | HttpRequestConfig | Request configuration. |
config
Name | Type | Description |
---|---|---|
adapter | AxiosAdapter | |
auth | AxiosBasicCredentials | |
baseURL | string | |
cancelToken | CancelToken | |
data | any | |
decompress | boolean | |
headers | AxiosRequestHeaders | |
httpAgent | any | |
httpsAgent | any | |
insecureHTTPParser | boolean | |
maxBodyLength | number | |
maxContentLength | number | |
maxRedirects | number | |
method | Method | |
onDownloadProgress | function | |
onUploadProgress | function | |
params | any | |
paramsSerializer | function | |
proxy | AxiosProxyConfig / false | |
responseEncoding | function | |
responseType | ResponseType | |
signal | AbortSignal | |
socketPath | function | |
responseEncoding | responseEncoding / string | |
socketPath | function | |
timeout | number | |
timeoutErrorMessage | string | |
transformRequest | AxiosRequestTransformer / AxiosRequestTransformer[] | |
transformResponse | AxiosResponseTransformer / AxiosResponseTransformer[] | |
transitional | TransitionalOptions | |
url | string | |
validateStatus | function | |
withCredentials | boolean | |
xsrfCookieName | string | |
xsrfHeaderName | string |
Basic Usage
await I.sendDeleteRequest("https://my-website.com/api/v1");
sendHeadRequest
Method allowing to send a HEAD request.
Parameter | Type | Description |
---|---|---|
url | string | Url of the targeted request. |
config | HttpRequestConfig | Request configuration. |
config
Name | Type | Description |
---|---|---|
adapter | AxiosAdapter | |
auth | AxiosBasicCredentials | |
baseURL | string | |
cancelToken | CancelToken | |
data | any | |
decompress | boolean | |
headers | AxiosRequestHeaders | |
httpAgent | any | |
httpsAgent | any | |
insecureHTTPParser | boolean | |
maxBodyLength | number | |
maxContentLength | number | |
maxRedirects | number | |
method | Method | |
onDownloadProgress | function | |
onUploadProgress | function | |
params | any | |
paramsSerializer | function | |
proxy | AxiosProxyConfig / false | |
responseEncoding | function | |
responseType | ResponseType | |
signal | AbortSignal | |
socketPath | function | |
responseEncoding | responseEncoding / string | |
socketPath | function | |
timeout | number | |
timeoutErrorMessage | string | |
transformRequest | AxiosRequestTransformer / AxiosRequestTransformer[] | |
transformResponse | AxiosResponseTransformer / AxiosResponseTransformer[] | |
transitional | TransitionalOptions | |
url | string | |
validateStatus | function | |
withCredentials | boolean | |
xsrfCookieName | string | |
xsrfHeaderName | string |
Basic Usage
await I.sendHeadRequest("https://my-website.com/api/v1");
sendPostRequest
Method allowing to send a POST request.
Parameter | Type | Description |
---|---|---|
url | string | Url of the targeted request. |
data | string | Data content of the request. |
config | HttpRequestConfig | Request configuration. |
config
Name | Type | Description |
---|---|---|
adapter | AxiosAdapter | |
auth | AxiosBasicCredentials | |
baseURL | string | |
cancelToken | CancelToken | |
data | any | |
decompress | boolean | |
headers | AxiosRequestHeaders | |
httpAgent | any | |
httpsAgent | any | |
insecureHTTPParser | boolean | |
maxBodyLength | number | |
maxContentLength | number | |
maxRedirects | number | |
method | Method | |
onDownloadProgress | function | |
onUploadProgress | function | |
params | any | |
paramsSerializer | function | |
proxy | AxiosProxyConfig / false | |
responseEncoding | function | |
responseType | ResponseType | |
signal | AbortSignal | |
socketPath | function | |
responseEncoding | responseEncoding / string | |
socketPath | function | |
timeout | number | |
timeoutErrorMessage | string | |
transformRequest | AxiosRequestTransformer / AxiosRequestTransformer[] | |
transformResponse | AxiosResponseTransformer / AxiosResponseTransformer[] | |
transitional | TransitionalOptions | |
url | string | |
validateStatus | function | |
withCredentials | boolean | |
xsrfCookieName | string | |
xsrfHeaderName | string |
Basic Usage
await I.sendPostRequest("https://my-website.com/api/v1");
sendPutRequest
Method allowing to send a PUT request.
Parameter | Type | Description |
---|---|---|
url | string | Url of the targeted request. |
data | string | Data content of the request. |
config | HttpRequestConfig | Request configuration. |
config
Name | Type | Description |
---|---|---|
adapter | AxiosAdapter | |
auth | AxiosBasicCredentials | |
baseURL | string | |
cancelToken | CancelToken | |
data | any | |
decompress | boolean | |
headers | AxiosRequestHeaders | |
httpAgent | any | |
httpsAgent | any | |
insecureHTTPParser | boolean | |
maxBodyLength | number | |
maxContentLength | number | |
maxRedirects | number | |
method | Method | |
onDownloadProgress | function | |
onUploadProgress | function | |
params | any | |
paramsSerializer | function | |
proxy | AxiosProxyConfig / false | |
responseEncoding | function | |
responseType | ResponseType | |
signal | AbortSignal | |
socketPath | function | |
responseEncoding | responseEncoding / string | |
socketPath | function | |
timeout | number | |
timeoutErrorMessage | string | |
transformRequest | AxiosRequestTransformer / AxiosRequestTransformer[] | |
transformResponse | AxiosResponseTransformer / AxiosResponseTransformer[] | |
transitional | TransitionalOptions | |
url | string | |
validateStatus | function | |
withCredentials | boolean | |
xsrfCookieName | string | |
xsrfHeaderName | string |
Basic Usage
await I.sendPutRequest("https://my-website.com/api/v1");
sendPatchRequest
Method allowing to send a PATCH request.
Parameter | Type | Description |
---|---|---|
url | string | Url of the targeted request. |
data | string | Data content of the request. |
config | HttpRequestConfig | Request configuration. |
config
Name | Type | Description |
---|---|---|
adapter | AxiosAdapter | |
auth | AxiosBasicCredentials | |
baseURL | string | |
cancelToken | CancelToken | |
data | any | |
decompress | boolean | |
headers | AxiosRequestHeaders | |
httpAgent | any | |
httpsAgent | any | |
insecureHTTPParser | boolean | |
maxBodyLength | number | |
maxContentLength | number | |
maxRedirects | number | |
method | Method | |
onDownloadProgress | function | |
onUploadProgress | function | |
params | any | |
paramsSerializer | function | |
proxy | AxiosProxyConfig / false | |
responseEncoding | function | |
responseType | ResponseType | |
signal | AbortSignal | |
socketPath | function | |
responseEncoding | responseEncoding / string | |
socketPath | function | |
timeout | number | |
timeoutErrorMessage | string | |
transformRequest | AxiosRequestTransformer / AxiosRequestTransformer[] | |
transformResponse | AxiosResponseTransformer / AxiosResponseTransformer[] | |
transitional | TransitionalOptions | |
url | string | |
validateStatus | function | |
withCredentials | boolean | |
xsrfCookieName | string | |
xsrfHeaderName | string |
Basic Usage
await I.sendPatchRequest("https://my-website.com/api/v1");