使用UCWA执行批处理请求并返回错误请求(400) [英] Doing a batch request with UCWA and getting back bad request (400)
问题描述
我正在邮递员上发出此请求
POST / ucwa / oauth / v1 / applications / 10751539691 / batch HTTP / 1.1
主机:lynctest
接受:多部分/配料
授权:承载CWT = AAEBHAEFAAAAAAAFFQAAACd5t5mMpiIgog-06W0EAACBEJH-LcfxNO5SsZ3Ya9NHaRuCApJLgyDicLiLBtMNWnuocJJPDyPsaKjMPvicnkz2uEo5ZZgTc4YIVAoilpQa1ggNEJH-LcfxNO5SsZ3Ya9NHaRs
内容类型:多部分/配料;边界= 77f2569d
缓存-Control:no-cache
--77f2569d
Content-Type:application / http; msgtype =请求
GET / ucwa / oauth / v1 / applications / 10751539691 / people / contacts HTTP / 1.1
主持人:lynctest
接受:application / json
--77f2569d
内容类型:application / http; msgtype =请求
GET / ucwa / oauth / v1 / applications / 10751539691 / people / contacts HTTP / 1.1
主持人:lynctest
接受:application / json
--77f2569d -
但我回来了
< pre class ="prettyprint"> - 2637af38-6f6e-4283-a4a6-6f6b8be3f916
Content-Type:application / http; msgtype =响应
HTTP / 1.1 400错误请求
内容类型:application / vnd.microsoft.com.ucwa + json
{" code": "BadRequest","message":"你的请求无法完成。"
--2637af38-6f6e-4283-a4a6-6f6b8be3f916
内容类型:application / http ; msgtype =响应
HTTP / 1.1 400错误请求
内容类型:application / vnd.microsoft.com.ucwa + json
{" code": "BadRequest","message":"你的请求无法完成。"
--2637af38-6f6e-4283-a4a6-6f6b8be3f916--
有谁知道什么是错的?
GET请求在标题后需要两个空行。一个用于标题和正文之间的空间。 空白体的第二个。
I am making this request on postman
POST /ucwa/oauth/v1/applications/10751539691/batch HTTP/1.1 Host: lynctest Accept: multipart/batching Authorization: Bearer cwt=AAEBHAEFAAAAAAAFFQAAACd5t5mMpiIgog-06W0EAACBEJH-LcfxNO5SsZ3Ya9NHaRuCApJLgyDicLiLBtMNWnuocJJPDyPsaKjMPvicnkz2uEo5ZZgTc4YIVAoilpQa1ggNEJH-LcfxNO5SsZ3Ya9NHaRs Content-Type: multipart/batching;boundary=77f2569d Cache-Control: no-cache --77f2569d Content-Type: application/http; msgtype=request GET /ucwa/oauth/v1/applications/10751539691/people/contacts HTTP/1.1 Host: lynctest Accept: application/json --77f2569d Content-Type: application/http; msgtype=request GET /ucwa/oauth/v1/applications/10751539691/people/contacts HTTP/1.1 Host: lynctest Accept: application/json --77f2569d--
but I get back
--2637af38-6f6e-4283-a4a6-6f6b8be3f916 Content-Type: application/http; msgtype=response HTTP/1.1 400 Bad Request Content-Type: application/vnd.microsoft.com.ucwa+json {"code":"BadRequest","message":"Your request couldn\u0027t be completed."} --2637af38-6f6e-4283-a4a6-6f6b8be3f916 Content-Type: application/http; msgtype=response HTTP/1.1 400 Bad Request Content-Type: application/vnd.microsoft.com.ucwa+json {"code":"BadRequest","message":"Your request couldn\u0027t be completed."} --2637af38-6f6e-4283-a4a6-6f6b8be3f916--
Does anyone know what's wrong?
GET requests require two blank lines after the header. One for the space between the header and body. The second for the blank body.
这篇关于使用UCWA执行批处理请求并返回错误请求(400)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!