-
Hello! I want to receive raw body of any response (200, 400, 500) for using in unirest interceptor for logging. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
If it's a parsing error the original body is kept on the exception ... which, I realize is a little weird. but it's like this: unirest-java/unirest/src/test/java/BehaviorTests/AsObjectTest.java Lines 152 to 163 in f19ab41 |
Beta Was this translation helpful? Give feedback.
-
Hello! How can I get rawbody of 500 response if no parsing error occured? |
Beta Was this translation helpful? Give feedback.
-
There is a mapError method that will have the error. You can map it into a error object or just a string: |
Beta Was this translation helpful? Give feedback.
If it's a parsing error the original body is kept on the exception ... which, I realize is a little weird. but it's like this:
unirest-java/unirest/src/test/java/BehaviorTests/AsObjectTest.java
Lines 152 to 163 in f19ab41