android - Add request header within DefaultRedirectHandler.getLocationURI callback -
i have following scenario:
android httpclient redirected alternative location, redirection url comes url parameter has propagated http header in redirection request. way interfere override defaultredirecthandler.getlocationuri handler. question: how within
public uri getlocationuri(httpresponse response, httpcontext context) i can modify out-coming request.
you have create implementation of redirecthandler , overwrite getlocationuri(). can redirect url by
header locationheader = response.getfirstheader("location"); string location = locationheader.getvalue(); extract url parameter location , httprequest by
basichttprequest request = (basichttprequest) context.getattribute( executioncontext.http_request); header.addheader();
Comments
Post a Comment