Hi all,

I actually posted this question on stackoverflow earlier. I am using Jetty
11 and I am trying to add a custom header into httpServletRequest in my
handler class.

Thanks to @Joakim Erdfelt <joa...@webtide.com> for introducing me to
HttpChannel.Listener. I followed his solution from stack-overflow comment
but stuck at finding the put() method. Here are my details:

   1. I created a class RequestChannelListener implements
   HttpChannel.Listener
   2. Created an instance of this class
   3. Added as bean into connector in main method of the project
   4. Within RequestChannelListener - I implemented method
   onRequestBegin(Request request) and used this -

public class RequestChannelListener implements HttpChannel.Listener {
    @Override
    public void onRequestBegin(Request request) {
        request.getHttpFields().put("X-Request-ID",
UUID.randomUUID().toString().toUpperCase());
    }
}

But I am not able to find the put method. Any suggestions?


Best,
Aniruddha
========
ᐧ
_______________________________________________
jetty-users mailing list
jetty-users@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users

Reply via email to