Clarify URI content in Execution Context
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1043518 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
40ef33ce81
commit
6ec87d3ce7
|
@ -543,7 +543,11 @@ byte[] response = httpclient.execute(httpget, handler);
|
|||
<formalpara>
|
||||
<title><constant>ExecutionContext.HTTP_REQUEST</constant>='http.request':</title>
|
||||
<para><interfacename>HttpRequest</interfacename> instance representing the
|
||||
actual HTTP request.</para>
|
||||
actual HTTP request.
|
||||
The final HttpRequest object in the execution context always represents
|
||||
the state of the message _exactly_ as it was sent to the target server.
|
||||
Per default HTTP/1.0 and HTTP/1.1 use relative request URIs.
|
||||
</para>
|
||||
</formalpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
|
|
@ -185,6 +185,9 @@ httpclient.getConnectionManager().shutdown();
|
|||
updated depending on the execution context. Therefore the final request properties such
|
||||
as the target host and request URI can be determined by examining the content of the
|
||||
local HTTP context after the request has been executed.</para>
|
||||
<para>The final HttpRequest object in the execution context always represents
|
||||
the state of the message _exactly_ as it was sent to the target server.
|
||||
Per default HTTP/1.0 and HTTP/1.1 use relative request URIs.</para>
|
||||
<programlisting><![CDATA[
|
||||
DefaultHttpClient httpclient = new DefaultHttpClient();
|
||||
|
||||
|
@ -197,7 +200,7 @@ HttpUriRequest req = (HttpUriRequest) localContext.getAttribute(
|
|||
ExecutionContext.HTTP_REQUEST);
|
||||
|
||||
System.out.println("Target host: " + target);
|
||||
System.out.println("Final request URI: " + req.getURI());
|
||||
System.out.println("Final request URI: " + req.getURI()); // relative URI
|
||||
System.out.println("Final request method: " + req.getMethod());
|
||||
]]></programlisting>
|
||||
</section>
|
||||
|
|
Loading…
Reference in New Issue