hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimitrios Christodoulakis" <dimi....@gmail.com>
Subject Re: difference between request headers and request params
Date Sat, 24 May 2008 14:03:47 GMT
Thank you for your quick reply. That sure helps. As I keep working and
practicing with HttpClient, I will post new questions. This seems like
a very handy tool actually.

On Sat, May 24, 2008 at 6:00 AM, Oleg Kalnichevski <olegk@apache.org> wrote:
> On Fri, 2008-05-23 at 16:03 -0500, Dimitrios Christodoulakis wrote:
>> Hello, I am a new user of HTTPClient and trying to learn how to use
>> it. I have read the relevant primer and user guide but I am not sure
>> what is the difference between headers and parameters.
>
> HTTP headers are elements of the HTTP request sent to the target server.
> Parameters are merely attributes that affect the way HttpClient
> functions. Parameters can apply to different aspects of HttpClient, not
> just request messages.
>
>
>>  Do they have
>> the same functionality for GET and POST requests?
>
> No, they do not
>
>>  I mean does the
>> server processes and responds differently to headers or parameters?
>>
>
> No, it does not. The server is completely unaware of the parameters.
> They are not a part of the HTTP protocol.
>
> Hope this helps
>
> Oleg
>
>> I am trying to set request headers with
>> addRequestHeader("MyHeaderName", "MyHeaderValue"); and then after
>> executing the method I print the headers like:
>>
>> Header[] reqheaders = authget.getRequestHeaders();
>>            for (int i=1; i<reqheaders.length; i++) {
>>            System.out.println(reqheaders[i].getName().toString() +" = "+
>> reqheaders[i].getValue().toString());
>>            }
>>
>> But no headers are displayed.
>>
>> Thanks for helping
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message