Forms 如何通过邮递员发送只有一个文本框和一个按钮的表单
我试着通过邮递员创建一个请求,请求正文下面有一个输入文本Forms 如何通过邮递员发送只有一个文本框和一个按钮的表单,forms,rest,postman,circuit-sdk,Forms,Rest,Postman,Circuit Sdk,我试着通过邮递员创建一个请求,请求正文下面有一个输入文本 { "subject" : "Fill Up the Form", "content" : "Form Data", "formMetaData" : { "id": "myform1234", "controls": [{ "type": "Circuit.Enums.FormControlType.INPUT", "name": "Your Name"
{
"subject" : "Fill Up the Form",
"content" : "Form Data",
"formMetaData" : {
"id": "myform1234",
"controls": [{
"type": "Circuit.Enums.FormControlType.INPUT",
"name": "Your Name"
}]
}
}
但我只在电路沙盒中获取内容和主题部分。表单部分丢失使用Rest API而不是SDK时,应使用控件类型的字符串替换枚举 我有一个在邮递员工作的代码样本
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"}]}'
希望这有帮助是的,它成功了,谢谢。我们没有创建json主体,而是将所有参数放在“x-www-form-urlencoded”选项下