should I define my httprequest to process requests in customized interceptor? #430
Replies: 2 comments 1 reply
-
oh, find one tricky approach for request: put it in request header , then my interceptor can process the request accordingly, but for response, I do not have any idea yet... |
Beta Was this translation helpful? Give feedback.
-
If the response encoding were a standard Java String encoding (UTF-8, Latin-1, etc) you can use the If you are talking about some kind of other encoding I'm not sure I have a good solution right now. Unirest has an interceptor but it comes after Unirest has already processed the response. Honestly I'm not sure that in this case Unirest is the best solution for you. Unirest is opinionated and designed for kind of standard Rest APIs returning formats like JSON. You might be happier with something closer to the wire like the Java-9 HttpClient or Apache HttpClient. |
Beta Was this translation helpful? Give feedback.
-
Hello, there is a new topic, I need do something (encoding or decoding etc) accordingly (depends on the specific symbol) for the specific bounch of requests/responses in my customized interceptor, do I need define my own HttpRequestA (extends unirest.xx.HttpRequest) to obtain this symbol since I cannot put/get it in current HttpRequest or http respons.
Beta Was this translation helpful? Give feedback.
All reactions