Exception in thread "main" java.lang.IllegalArgumentException: Cannot set a request body for HTTP method GET
at org.jsoup.helper.Validate.isFalse(Validate.java:64)
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:551)
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:587)
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:540)
at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:227)
at com.mtons.mblog.XJWTest.login(XJWTest.java:88)
at com.mtons.mblog.XJWTest.main(XJWTest.java:20)
//请求url获取响应信息
Connection.Response res = con.ignoreContentType(true).method(Connection.Method.POST).execute();
请求的时候已经设置了 post
查找到是
请求的之后 302转发成了get 请求而req的 body还在其中
所以造成
Exception in thread "main" java.lang.IllegalArgumentException: Cannot set a request body for HTTP method GET