我正在尝试通过 REST API 将文件附加到 Asana 中的任务,但出现超时错误。我相信错误来自体式方面,所以我有点卡住了......
我提出的请求具有以下格式
POST https://app.asana.com/api/1.0/tasks/<my task>/attachments HTTP/1.1
User-Agent: OutSystemsPlatform
Content-Type: multipart/form-data; boundary="<my boundary>"
Authorization: Bearer <my bearer>
Host: app.asana.com
Content-Length: 218
--<my boundary>
content-disposition: multipart/form-data; name=file; filename=<my filename>;
content-type: image/jpeg
<file binary data>
--<my boundary>--
我得到的答复如下
HTTP/1.1 504 Gateway Time-out
Connection: keep-alive
Content-Length: 176
Content-Type: text/html
Date: Tue, 28 Apr 2015 11:36:03 GMT
Server: nginx
<html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>
在我看来,请求的格式很好,但它不起作用。
任何人都可以帮忙吗?
谢谢佩德罗·卡多索