Forums Register Login

Jersey RESTresponse message body

+Pie Number of slices to send: Send
How to print response message body as a String within filter method and tried couple of response methods (getEntityOutputStream() / getEntity() / GetContainerResponseWriter() )



public class Test implements ContainerRequestFilter , ContainerResponseFilter) {

@Override
public ContainerResponse filter(ContainerRequest request, ContainerResponse response) {
response.
}

}
+Pie Number of slices to send: Send
Any update ?
+Pie Number of slices to send: Send
You should be looking at creating an interceptor rather than a filter. Here's a quick example using FilterInputStream to get in the middle of the input stream. There are probably better ways to do this.

Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 614 times.
Similar Threads
REST Web service authentication
How to access jsp form parameters in a ContainerRequestFilter
how to create custom annotation in jersey
REST Interceptor argument passthrough
code using the filter is not working
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 22:47:00.