Azure Logic Apps -Multipart/form -data失败
我正在尝试设置一个逻辑应用程序,该应用程序将将数据发布到AWS桶(链接)接受格式为multipart/form-data
的内容。但是,我无法获得成功的请求,并且只能获得某种与多部分结构有关的错误形式。
错误: < error>> code> code</code>< messages>当请求主体出乎意料地终止了</code
在Beepeptor中捕获请求以比较逻辑应用程序与标准HTTP呼叫的请求时从一个休息客户端,我可以看到两个身体都是相同的,但是标头也有所不同。逻辑应用程序添加了很多跟踪信息,但似乎也发送了不同的content-Length
。
VS代码REST客户端请求(正确工作):
{
"content-length": "2425",
"user-agent": "vscode-restclient",
"content-type": "multipart/form-data; boundary=formBoundary",
"accept-encoding": "gzip, deflate"
}
逻辑应用程序请求:
{
"content-length": "2384",
"accept-language": "en-US",
"user-agent": "azure-logic-apps/1.0 (workflow <redacted>; version <redacted>)",
"x-ms-workflow-id": "<redacted>",
"x-ms-workflow-version": "<redacted>",
"x-ms-workflow-name": "<redacted>",
"x-ms-workflow-system-id": "/scaleunits/prod-00/workflows/<redacted>",
"x-ms-workflow-run-id": "<redacted>",
"x-ms-workflow-run-tracking-id": "<redacted>",
"x-ms-workflow-operation-name": "Import_File",
"x-ms-tracking-id": "<redacted>",
"x-ms-correlation-id": "<redacted>",
"x-ms-client-request-id": "<redacted>",
"x-ms-client-tracking-id": "<redacted>",
"x-ms-action-tracking-id": "<redacted>",
"x-ms-activity-vector": "IN.02",
"traceparent": "<redacted>",
"accept-encoding": "gzip, deflate",
"content-type": "multipart/form-data; boundary=formBoundary"
}
有关如何解决此问题的任何想法?
I'm trying to set up a Logic App that will post data to an AWS Bucket (Link) accepting content formatted as multipart/form-data
. However, I'm not able to get a successful request running and only get some form of error that seems to be related to the multipart structure.
Error:<Error><Code>IncompleteBody</Code><Message>The request body terminated unexpectedly</Message
When catching the request in Beeceptor to compare the request from Logic Apps with a standard HTTP call from a REST Client I can see that both bodies are identical but the headers differ. Logic Apps adds a lot of tracking info but also seems to send a differing Content-Length
.
VS Code REST Client request (working correctly):
{
"content-length": "2425",
"user-agent": "vscode-restclient",
"content-type": "multipart/form-data; boundary=formBoundary",
"accept-encoding": "gzip, deflate"
}
Logic Apps request:
{
"content-length": "2384",
"accept-language": "en-US",
"user-agent": "azure-logic-apps/1.0 (workflow <redacted>; version <redacted>)",
"x-ms-workflow-id": "<redacted>",
"x-ms-workflow-version": "<redacted>",
"x-ms-workflow-name": "<redacted>",
"x-ms-workflow-system-id": "/scaleunits/prod-00/workflows/<redacted>",
"x-ms-workflow-run-id": "<redacted>",
"x-ms-workflow-run-tracking-id": "<redacted>",
"x-ms-workflow-operation-name": "Import_File",
"x-ms-tracking-id": "<redacted>",
"x-ms-correlation-id": "<redacted>",
"x-ms-client-request-id": "<redacted>",
"x-ms-client-tracking-id": "<redacted>",
"x-ms-action-tracking-id": "<redacted>",
"x-ms-activity-vector": "IN.02",
"traceparent": "<redacted>",
"accept-encoding": "gzip, deflate",
"content-type": "multipart/form-data; boundary=formBoundary"
}
Any ideas on how to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
显然,这些问题与如何格式化多派形式数据并添加到HTTP-重复步骤有关。我从以下格式开始:
工作(如 msft docs ):
文档对此非常稀缺,错误代码并没有真正指导您朝任何相关方向引导您,希望这对其他人有帮助。
Apparently the issues were related to how the multipart-form data was formatted and added to the HTTP-request step. I started with the following format:
When changing it to the following format it started working (as suggested in MSFT docs):
The documentation is quite scarce on this and the error codes do not really direct you in any relevant direction unfortunately, hopefully this helps someone else.