Server returned HTTP response code: 400 for URL

i send this request in postman and get response as i need, but in java code i get this error repeatedly.


What does the request do?


Update a row in table ‘Lock’ just one property “cennection_status”:false

this is all my code, just one class of java.
i wrote this project in Intelij Idea.

myp.rar (9.25kB)

Per the support policy we do not review project code, however, if you can share the details of a specific REST request you make in Postman, we can help you with that. We would need to know the following:

    URL where you send the request Request body Request headers HTTP method (GET/POST/PUT/DELETE)
Regards, Mark

please don’t worry and open my project file, because i created new project and i wrote just a put request on it, nothing else. i do not sent my main files, just one class is in that jar file and just one method for send request is in it, so you can find every detail you need in it. thank you.

You file you attached is broken:</img>

You said you have a problem with Postman, let’s focus on that instead.


ok, see this one (0.92kB) (10.19kB)

The code doesn’t quite make sense. You’re sending a PUT request (which is an object update), but there is no body in the request. See the docs here:


your provided link does not tell me anything about BODY and how can i set BODY. but i heard your word about problem is in BODY, furthermore i tried to change it and it worked.

i changed a sample code for my purpose so does not work well, i change body from option 1 to option 2 and it worked well:

  1. requestParameters = “connection_status=false”;

  2. requestParameters = “{“connection_status”:false}”;

Thanks for your support.