Page 1 of 1

Web Service Issue – HTTP 400 Bad Request

Posted: Mon Nov 24, 2025 4:36 pm
by sandrocarosso
Hi everyone,
I’m consuming a web service that sometimes returns HTTP 400 – Bad Request.
In these cases, instead of receiving a JSON response, I get characters that seem “unreadable” (at least to me).
Could this be due to the way I’m calling the API?
Or do I need to specify some particular parameter?
Thanks in advance for your help!

Re: Web Service Issue – HTTP 400 Bad Request

Posted: Thu Nov 27, 2025 12:13 am
by Scott Klement
The reason you can't read the characters is that they are compressed with gzip. I don't know why they are sending it that way, the HTTP standard says that they are not allowed to compress the payload unless the client says they allow it. Compression is always optional in HTTP. But they have decided to ignore the standards and send it compressed anyway.

At any rate, 400 bad request means that the data you are sending to the API (aka the "request") is bad in some way. You'll need to find out what its supposed to be, and compare yours with that and determine what is wrong.

Re: Web Service Issue – HTTP 400 Bad Request

Posted: Fri Nov 28, 2025 3:46 pm
by sandrocarosso
Hello Scott, thank you for your reply. We investigated to find out what the incorrect data was and have now corrected it: it is now working correctly.

Thank you for your support.