Skip to content

Request configuration

ParameterTypeDescriptionExample
argslistCustom arguments which are used to give more control in request. Can be added to the endpoint, headers or body parameters using a {} syntax. The args can then be defaulted to a string or integerargs: - id: 1
methodget / post / put / patch / delete / options / headHTTP methodget
endpointstringURL of your endpointhttp://localhost:8000/blog/1
headerslistList of headers in format - Header-Name: value- Content-Type: application/json
bodystringSimple string containing body data{ id: 123 }
allow-headerslistList of headers you want to show, will remove any other header and keep the output clean- Content-Type
method: GET
endpoint: https://jsonplaceholder.typicode.com/todos/5
headers:
- Content-Type: application/json
- Accept: application/json
args:
- id: 1 # specify 1 as default value
method: GET
endpoint: https://jsonplaceholder.typicode.com/todos/{id} # use ID value here
headers:
- Content-Type: application/json
- Accept: application/json

Args can be used on the run command.

Terminal window
sendex run get-example.yml id=5
args:
- id: 1 # specify 1 as default value
method: GET
endpoint: https://jsonplaceholder.typicode.com/todos/{id} # use ID value here
headers:
- Content-Type: application/json
- Accept: application/json
allow-headers:
- Nil
args:
- id: 1 # specify 1 as default value
method: GET
endpoint: https://jsonplaceholder.typicode.com/todos/{id} # use ID value here
headers:
- Content-Type: application/json
- Accept: application/json
allow-headers:
- Content-Type
method: POST
endpoint: https://jsonplaceholder.typicode.com/todos
body: |
{
"userId": 222,
"title": "delectus aut autem",
"completed": false
}
headers:
- Content-Type: application/json
- Accept: application/json
args:
- id: 1 # specify 1 as default value
method: POST
endpoint: https://jsonplaceholder.typicode.com/todos
body: |
{
"userId": {id},
"title": "delectus aut autem",
"completed": false
}
headers:
- Content-Type: application/json
- Accept: application/json

Args can be used on the run command.

Terminal window
sendex run post-example.yml id=5