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 Subhash Chandran <su...@gmail.com> on 2008/08/14 20:27:39 UTC

HttpGet.getRequestLine() -- Why not part of org.apache.http.HttpMessage

This is something which is common to all the HTTP methods, then why
this partiality?

Basically, I am trying to re-create the HTTP request generated by
HttpClient so that I can show in RESTClient (
http://rest-client.googlecode.com/ ) the text format of the request,
so that people can understand what is going on underneath.

Is this possible by any other means?

-- 
Regards,
Subhash Chandran S

http://rest-client.googlecode.com/

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


Re: HttpGet.getRequestLine() -- Why not part of org.apache.http.HttpMessage

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2008-08-17 at 01:36 +0530, Subhash Chandran wrote:
> My question is: why is the method getRequestLine() part of HttpGet
> when it is common to all HTTP methods? It would be better to define it
> in org.apache.http.HttpMessage, so that from all Http* methods I will
> be able to access this information.
> 
> Subhash.
> 

Because HttpMessage is a base interface for both HttpRequest and
HttpResponse interfaces:

http://hc.apache.org/httpcomponents-core/httpcore/apidocs/org/apache/http/HttpMessage.html

HttpRequest represents an HTTP request message and provides access to
the request line: 

http://hc.apache.org/httpcomponents-core/httpcore/apidocs/org/apache/http/HttpRequest.html

The HttpResponse represents an HTTP response message and provides access
to the status line:

http://hc.apache.org/httpcomponents-core/httpcore/apidocs/org/apache/http/HttpResponse.html

All HTTP methods implement HttpRequest. 

Oleg


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


Re: HttpGet.getRequestLine() -- Why not part of org.apache.http.HttpMessage

Posted by Subhash Chandran <su...@gmail.com>.
My question is: why is the method getRequestLine() part of HttpGet
when it is common to all HTTP methods? It would be better to define it
in org.apache.http.HttpMessage, so that from all Http* methods I will
be able to access this information.

Subhash.

On Fri, Aug 15, 2008 at 11:43 PM, Oleg Kalnichevski <ol...@apache.org> wrote:
> On Thu, 2008-08-14 at 23:57 +0530, Subhash Chandran wrote:
>> This is something which is common to all the HTTP methods, then why
>> this partiality?
>>
>> Basically, I am trying to re-create the HTTP request generated by
>> HttpClient so that I can show in RESTClient (
>> http://rest-client.googlecode.com/ ) the text format of the request,
>> so that people can understand what is going on underneath.
>>
>> Is this possible by any other means?
>>
>
> I am not sure I understand the problem. What is wrong with just using
> HttpRequest interface instead?
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>



-- 
Regards,
Subhash Chandran S

http://rest-client.googlecode.com/

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


Re: HttpGet.getRequestLine() -- Why not part of org.apache.http.HttpMessage

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2008-08-14 at 23:57 +0530, Subhash Chandran wrote:
> This is something which is common to all the HTTP methods, then why
> this partiality?
> 
> Basically, I am trying to re-create the HTTP request generated by
> HttpClient so that I can show in RESTClient (
> http://rest-client.googlecode.com/ ) the text format of the request,
> so that people can understand what is going on underneath.
> 
> Is this possible by any other means?
> 

I am not sure I understand the problem. What is wrong with just using
HttpRequest interface instead?

Oleg 


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