【Chaos Mesh官方文档】Send HTTP Requests on Workflow

Chaos Mesh Workflow provides a Task node to support any workload, similar to Kubernetes Job. To make the user experience more convenient, Chaos Dashboard provides a template based on Task to create HTTP requests in WebUI.

Chaos Mesh Workflow provides a Task node to support any workload, which function is similar to the Job in Kubernetes. To provide a better user experience, Chaos Dashboard provides a template based on Task. With this template, you can easily create HTTP requests in WebUI. This document describes how to create an HTTP request through Chaos Dashboard.
note

Chaos Mesh does NOT have the workflow node of the type HTTPRequest. This feature is based on Task node, and you can send HTTP requests more conveniently by using the feature.
note

This feature is currently an experimental feature, so it is not recommended to use this feature in the production environment. The configuration and behavior of the feature might change in the future.
Create an HTTP request through Chaos Dashboard​

You can create an HTTP request in Chaos Dashboard as the following steps that take sending a message through Slack Webhook as an example.
Step 1. Create a workflow node with the type HTTPRequest​

Select “HTTP Request” as the task type:

create-http-request-workflow-node
Step 2. Configure an HTTP request​

Configure the followings:

node name: send-slack-message
request URL: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
request method: POST
request body: {"text": "Hello, world."} , then check "For JSON content".

configure-http-request-workflow-node
Step 3. Submit the workflow node​

Click the “Submit” button to see the task in the preview window:

http-request-task-node-preview
Field description​
Parameter Type Description Default value Required Example
Name string Name of the workflow node Yes send-slack-message
URL string URL of an HTTP request Yes https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
Method string Method of an HTTP request Yes POST
Body string Body of an HTTP request No {“text”: “Hello, world.”}
Follow 301/302 Location boolean The value of this parameter corresponds to the -L parameter of curl. false No false
Json Content boolean The parameter appends Content-Type: application/json to the header of an HTTP request. false No false

The value of the name field of the generated task node adds the suffix http-request to the end of “name”.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值