Cool
Cool
Published on 2021-06-28 / 36 Visits
0
0

jsoup post方式请求接口错误“HTTP error fetching URL. Status=400”解决方法

错误信息: Exception in thread "main" org.jsoup.HttpStatusException: HTTP error fetching URL. Status=400, URL=“xxxxxxx”

 .ignoreContentType(true)
 .ignoreHttpErrors(true)

{message type="info" content="添加上面两个属性问题解决!get()的时候一般不会有问题,但是如果你是post方式提交数据到接口,报错的概率相当高,建议

不管是post,还是get,均开启这两个参数,万无一失!"/}


Comment