'Can't set body through ClientRequestFilter
I'm developing a Quarkus app and trying to insert a body in a Post Request through intercepting it on a ClientRequestFilter. The method is exectuted on each call and the Entity changes correctly, but when I test this request (on Postman), the body is still the same Postman sent.
This is the method:
public void filter(ClientRequestContext requestContext) throws IOException {
if (requestContext.getMethod().equals("POST")) {
UserDTO user = new UserDTO("aaa", "bbb");
requestContext.setEntity(user);
}
}
Thank you!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
