post Interface send json Method
Same interface , Same parameters ,form The way is successful ,json The method prompts that the parameters are incomplete
Change to httpPost.addHeader("Content-Type", "application/json"); Not good either.
The other party's service returns you a message , It means you can communicate with each other , The result returned by the other party's service indicates that your request lacks necessary parameters, such as 2 Maybe
1. You send the request with fewer parameters
2. The opposite interface cannot be resolved json Format parameters
Look at the use of... In your problem statement post+form-data The way is to request success , Then I think it may be that the other party's interface cannot receive json Parameters , Please confirm that... Is added to the interface provided by the other party @RequestBody annotation
The request type of the request header is changed to json Format .
Reference resources ：
If help , Please accept . Click on the top right corner of my answer 【 Adopt 】 Button .