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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to