Home > Back-end >  Request the address data, at 400
Request the address data, at 400

Time:05-07

 public static String sendPost (String postUrl) throws the Exception {
The String url=postUrl;
The String result="";
Try {
//System. SetProperty (" HTTPS. Separate protocols ", "TLSv1, TLSv1.2, SSLv3");
The HttpRequest post=HttpUtil. CreateGet (url);
Post. The header (" Authorization ", Authorization);
Post. ContentType (" application/json; charset=UTF-8");
Post. Charset (" utf-8 ");
Post. A timeout (300000);
HttpResponse execute=post. The execute ();
If (execute) isOk ()) {
Result=the execute. Body ();
Logger. The info (" the returned data is: "+ result);

} else {
Logger. The info (" request failure & gt;>" + the execute. Body ());
}

} the catch (Exception e) {

e.printStackTrace();
}

return result;

}


Now I would like to request a url, but the error log at 400, have bosses know what's going on?

 INFO. [the main] com winchannel. Viet. Start. SendPost (561) - failed to request & gt;>    Bad Request 
<meta HTTP - EQUIV="content-type" Content="text/HTML. Charset=us - ASCII "& gt;
<body>

HTTP Error 400. The request verb is invalid. & lt;/p>

CodePudding user response:

Page request body with background do not match the request body interface definition, so abnormal at 400

CodePudding user response:

1/f, reference source is a ghost reply:
page request body with background do not match the request body interface definition, so to 400 abnormal

How to see a different request body I am a small white
  • Related