The GET step allows for making GET requests.
get_step:
call: http.get
args:
url: https://www.example-url.com
result: responseVariable
Mandatory fields:
call
, with valuehttp.get
- determines the step typeargs
url
- the desired resource to query
Optional fields:
args
query
- ..desired query values - Scripts can be used for query values
headers
- ..desired header values - Scripts can be used for headers values
result
- name of the variable to store the response of the query in, for use in other steps
If a result
field is valued, then both the request parameters and request response are stored into a variable with the designated name.
Request parameters are stored under the request
field
Request response is stored under the response
field
The resulting object looks like this, assuming that the result
field is valued getStepResult
:
{
"getStepResult": {
"request": {
"url": ...,
"query": ...,
"headers": ...,
"body": ...
},
"response": {
"body": {
...body
},
"headers": {
...headers
},
"status": ...
}
}
}
get_message:
call: http.get
args:
url: http://localhost:8080/steps/return/return-with-script
query:
some_val: "Hello World"
another_val: 123
result: the_message
get_message:
call: http.get
args:
url: http://localhost:8080/steps/return/return-with-script
headers:
Content-Type: "text/plain"
result: the_message
assign_values:
assign:
stringValue: "Bürokratt"
integerValue: 2021
get_message:
call: http.get
args:
url: http://localhost:8080/steps/return/return-with-script
query:
some_val: ${stringValue}
another_val: ${integerValue}
result: the_message
get_message:
call: http.get
args:
url: http://localhost:8080/steps/return/return-with-script
result: the_message
return_value:
return: ${the_message.response}
get_message:
call: http.get
args:
url: http://localhost:8080/steps/return/return-with-script
query:
var: "value"
result: the_message
return_value:
return: ${the_message.request}