Home > Back-end >  Interface call problem
Interface call problem

Time:09-16

Ask a question, the same interface, the request message, use HttpClient send a post request is normal, but use HttpURLConnection to 406, this is what reason, and the difference in where

CodePudding user response:

The code so you couldn't see the difference between

CodePudding user response:

HttpClient is a product of Apache
HttpURLConnection is the father of Java's masterpiece, not need doubt
Can see you accustomed to, I like the latter more, the reason is that don't need to refer to any jars

CodePudding user response:

The Request Headers, and to specify the Type of the content-type

CodePudding user response:

For HTTP status code of 406 general agreement format error, can cut package and see format correct?
  • Related