1.报错原因
post请求的content-type : application/x-www-form-urlencoded 但是请求体中设置的是json数据。
{"date":"2022-01-01","inclTransfer":"Y","endDate":"2022-01-31","accbookCode":["JT0001"],"allEndLevel":"N","inclError":"Y","startSubjLevel":"1","inclUntallyed":"Y","queryByPeriod":"N","isOffChartAcc":"N","currtypeCode":"本币","endSubjLevel":"1","inclReclassify":"N","startSubjCode":"1001","endSubjCode":"1001"}
导致服务器不能正确解析body中的值,因此报错。
2.问题解决
将请求头中的 content-type : application/x-www-form-urlencoded 更改为 content-type : application/json
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)