HTTP Request with YAML
Tip
YAML parameters for HTTP Request
Name | Type | Description |
---|---|---|
action Required | String | The ID of the action. |
type Required | String | The type of the action. Should be set to HTTP . |
notification_url Required | String | The target URL. |
method_url Required | String | The desired HTTP method. Available values are GET , POST , PUT , PATCH or DELETE . |
port | String | The port for the connection. |
login | String | The username required to connect to the server. |
password | String | The password required to connect to the server. |
content | String | The content of the request. |
headers | Header[] | The headers that will be sent with the request. |
YAML example for HTTP request
actions:
- action: "Send HTTP request to http://mywebserver.io"
type: "HTTP"
login: "api_tests_user"
password: "$api_tests_password"
port: "4567"
notification_url: "$url"
method: "POST"
content: "{\r\n\t\"url\": \"${BUDDY_EXECUTION_URL}\",\r\n\t\"html_url\": \"${BUDDY_EXECUTION_URL}\",\r\n\t\"id\": \"${BUDDY_EXECUTION_ID}\",\r\n\t\"start_date\": \"${BUDDY_EXECUTION_START_DATE}\",\r\n\t\"mode\": \"${BUDDY_EXECUTION_START_DATE}\",\r\n\t\"refresh\": \"${BUDDY_EXECUTION_REFRESH}\",,\r\n\t\"comment\": \"${BUDDY_EXECUTION_COMMENT}\",\r\n}"
headers:
- name: "User-Agent"
value: "Buddy"
- name: "Content-Type"
value: "application/json"
timeout: 120
variables:
- key: "url"
value: "http://mywebserver.io"
Last update:
Sep 23, 2024
Sep 23, 2024