如何通过邮递员发送只有1个文本框和1个按钮的表单

问题描述 投票:0回答:2

[我尝试通过邮递员在请求正文下方输入1个输入文本来创建请求,

{
    "subject" : "Fill Up the Form",
    "content" : "Form Data",
    "formMetaData" : {
      "id": "myform1234",
      "controls": [{
        "type": "Circuit.Enums.FormControlType.INPUT",
        "name": "Your Name"
      }]
    } 
}

但是我只在Circuit Sandbox中获得Content and Subject部分。表单部分缺失

forms rest postman circuit-sdk
2个回答
0
投票

使用Rest API而不是SDK,应将ENUMS替换为控件类型的字符串。

我为此在Postman中有一个工作代码示例

curl -X POST \
  https://beta.circuit.com/rest/v2/conversations/6aecff9e-1aa0-46f3-8e24-8519e2956291/messages \
  -H 'Authorization: Bearer 11111omitted' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -F 'content=Please fill in the form below' \
  -F 'subject=Test form' \
  -F 'formMetaData={"id":"myformonbeta","title":"Test Form","controls":[{"type":"INPUT","name":"name","text":"What is your namne ?","rows":1},{"type":"BUTTON","text":"Send"}]}'

希望这会有所帮助

© www.soinside.com 2019 - 2024. All rights reserved.