使用邮差得到500内部错误发送有效负载
我想反向工程的一个API我不控制的服务器。起初我认为以下网址(它不需要任何凭证登录):使用邮差得到500内部错误发送有效负载
https://www.abc.ca.gov/datport/lqs.html?rpttype=3&rptdateoffset=0
使用Chrome浏览器开发工具,我看到的数据是通过以下网址显示: https://www.abc.ca.gov/LQSService.svc/LicenseRequest
我用的网址,邮差作为POST请求:
POST https://www.abc.ca.gov/LQSService.svc/LicenseRequest
铬工具显示ř邮递员请求eQUEST的有效载荷我在身体(原)使用方法:
{"data":"<ROOT><PAGENUMBER>1</PAGENUMBER><RPTTYPE>3</RPTTYPE><RPTDATEOFFSET>0</RPTDATEOFFSET><RPTDATE>11/29/2017</RPTDATE><FORMATEDDATE>Wednesday, Nov 29, 2017</FORMATEDDATE><RPTGROUP>DAILY3</RPTGROUP></ROOT>"}
当我在邮差执行请求我收到以下错误:
{ "ExceptionDetail": null,
"ExceptionType": null,
"Message": "The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.",
"StackTrace": null
}
的头从结果表明:
jsonerror →true
铬请求头还示出了我加入到邮递员请求(头)具有相同的错误发生的情况如下:
X-Requested-With:XMLHttpRequest Cookie:ASPSESSIONIDCWQRCBDR=IBNIPHCCIGMJLKOPDMDJKCPJ
我还增加了以下的Cookie中邮差,以及:
ASPSESSIONIDCWQRCBDR=IBNIPHCCIGMJLKOPDMDJKCPJ; path=/; domain=.www.abc.ca.gov; Expires=Tue, 19 Jan 2038 03:14:07 GMT;
我还有什么东西可能会丢失或未在邮递员请求中正确指定?
如Chrome浏览器中显示的完整请求头是:
Accept:application/json, text/javascript, */*; q=0.01 Accept-Encoding:gzip, deflate, br
Accept-Language:en-US,en;q=0.9
Connection:keep-alive
Content-Length:210
Content-Type:application/json; charset=UTF-8
Cookie:ASPSESSIONIDCWQRCBDR=IBNIPHCCIGMJLKOPDMDJKCPJ; __utmt=1;
__utma=158387685.1745889465.1508735899.1512200444.1512230785.12;
__utmb=158387685.6.10.1512230783; __utmc=158387684;
__utmz=158387685.1512185091.8.2.utmcsr=google|utmccn=
(organic)|utmcmd=organic|utmctr=(not%20provided)
Host:www.abc.ca.gov
Origin:https://www.abc.ca.gov
Referer:https://www.abc.ca.gov/datport/lqs.html?
rpttype=3&rptdateoffset=0
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
X-Requested-With:XMLHttpRequest
回答:
原来我只需要指定头的Content-Type。
以上是 使用邮差得到500内部错误发送有效负载 的全部内容, 来源链接: utcz.com/qa/257283.html