You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Arya F <ar...@gmail.com> on 2016/10/09 04:59:31 UTC
Get response header from 204 response code
I have also asked about this on Stackoverflow and have not gotten any
solutions. Here is the link to the question but I will also explain it here
http://stackoverflow.com/questions/39939509/get-location-header-from-204-
response
I am working with a request which responses with a 204 status code which
means no response. But the response does contain headers. I am trying to
get the value of the "Location" response header. I have tried the
context.REDIRECT_LOCATIONS and it is null which always worked when the
response code was not 204.
How can I retrieve the value of the Location response header?
Re: Get response header from 204 response code
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2016-10-09 at 00:59 -0400, Arya F wrote:
> I have also asked about this on Stackoverflow and have not gotten any
> solutions. Here is the link to the question but I will also explain it here
>
> http://stackoverflow.com/questions/39939509/get-location-header-from-204-
> response
>
>
> I am working with a request which responses with a 204 status code which
> means no response. But the response does contain headers. I am trying to
> get the value of the "Location" response header. I have tried the
> context.REDIRECT_LOCATIONS and it is null which always worked when the
> response code was not 204.
>
> How can I retrieve the value of the Location response header?
Header location = response.getFirstHeader("location");
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org