function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Brandon COFFINBrandon COFFIN 

Rest API Java request JSON response

Hello,

I have a problem with my Java rest API request.
I would like to have the full JSON response, I explain.

For example, in Java, here is what I have for response code :
400

And for response message :
Bad request

Using something else, the code is the same but the message is :
Item designation/marking: data value too large: DECOR ENTIER \"COMMUNE DE CONTHEY+EAUX CLAIRES\" 400KN (max length=60)

This is what I would like to have in Java, using HttpURLConnection.

How can I do this ?

Thank you,
COFFIN Brandon
Best Answer chosen by Brandon COFFIN
SKolakanSKolakan
You should probably look at response body as opposed to response status.

All Answers

SKolakanSKolakan
You should probably look at response body as opposed to response status.
This was selected as the best answer
Brandon COFFINBrandon COFFIN
I'll try this, thanks