How to access or modify HttpRequest/HttpResponse headers in my application

2,935 views
Skip to first unread message

Shrikar archak

unread,
Dec 10, 2012, 3:44:10 PM12/10/12
to dropwiz...@googlegroups.com
Hi All,
I am using dropwizard to build a application which provides redirection(301 using Location header) depending on what headers are passed.
I was figuring out if there is a nice way to get the list all the headers which are associated with the incoming request. I see that there is @HeaderParams from which we can access the request headers, but it would nice
if I can get hold of the httprequest itself. 
Also for providing redirection I need to add the location header to the http response . I couldn't find a way to do this currently in the documentation.

Thanks,
Shrikar
Message has been deleted

Olve Hansen

unread,
Dec 10, 2012, 3:53:47 PM12/10/12
to dropwiz...@googlegroups.com
I have used this approach earlier with Jersey, so it should work in Dropwizard as well: http://stackoverflow.com/questions/5118752/how-do-i-access-the-http-request

-- 
Olve
Reply all
Reply to author
Forward
0 new messages