codeceptjs-axios
codeceptjs-http is CodeceptJS helper which wraps axios library to perform requests. It's alternative helper that provides more flexible request management.
Configuration
This helper should be configured in codecept.json/codecept.conf.js
baseURL
: base HTTP url.
Example:
sendGetRequest
Send HTTP request, response will be availible as return value.
I;
Parameters
url
- endpoint path. Can be relative or absoluteheaders
- (optional) to include token in the headers for example
sendPostRequest
Send HTTP request, response will be availible as return value.
I;
Parameters
url
- endpoint path. Can be relative or absolutepayload
- the request body to sendheaders
- (optional) to include token in the headers for example
sendPatchRequest
Send HTTP request, response will be availible as return value.
I;
Parameters
url
- endpoint path. Can be relative or absolutepayload
- the request body to sendheaders
- (optional) to include token in the headers for example
sendPutRequest
Send HTTP request, response will be availible as return value.
I;
Parameters
url
- endpoint path. Can be relative or absolutepayload
- the request body to sendheaders
- (optional) to include token in the headers for example
sendDeleteRequest
Send HTTP request, response will be availible as return value.
I;
Parameters
url
- endpoint path. Can be relative or absoluteheaders
- (optional) to include token in the headers for example