Is it possible to access the Request object in a REST method under JAX-RS?
I just found out
@Context Request request;
On JAX-RS you must annotate a Request parameter with @Context:
@GET public Response foo(@Context Request request) { }
Optionally you can also inject:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With