当请求将文档添加到草稿信封时,我得到了Content Type specified is not supported. Content-Type for part[0] must be application/json or application/xml。据我所知,在文档中,一切看起来都与它们的示例完全一样。但我一直在犯这个错误。也许你能帮忙?这是我的全部要求。
PUT /restapi/v2/accounts/<int>/envelopes/<string>/documents HTTP/1.1
Host: demo.docusign.net
Accept: application/json
X-DocuSign-Authentication: <personal information excluded>
Content-Type: multipart/form-data; boundary=AAA
Content-Length: 23661
--AAA
Content-Type: application/json
Content-Disposition: form-data
{"documents":[{"documentId":"contract-8","name":"contract-8.pdf","order":0}]}
--AAA
Content-Type: application/pdf
Content-Disposition: file; filename="contract-8.pdf"; documentId="contract-8"
<bits for PDF removed>
--AAA--我正在跟踪文档这里。我正在使用PHP中的cURL构建请求。我很有信心这个问题是不存在的,但是如果你好奇的话,我一直在构建我自己的库这里用于我的项目。
再次感谢。
发布于 2016-01-21 21:06:42
您需要在MIME标题之后添加一个换行符,因此在内容处理: form-data和{ of json之间添加一条空行。
https://stackoverflow.com/questions/34932320
复制相似问题