Fixed typo
git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@555208 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0a7a2b6c72
commit
fc9772e6b1
|
@ -57,16 +57,16 @@ public class ClientCustomContext {
|
|||
// Obtain default HTTP context
|
||||
HttpContext defaultContext = httpclient.getDefaultContext();
|
||||
// Create local HTTP context
|
||||
HttpContext localContent = new HttpClientContext(defaultContext);
|
||||
HttpContext localContext = new HttpClientContext(defaultContext);
|
||||
// Bind custom HTTP state to the local context
|
||||
localContent.setAttribute(HttpClientContext.HTTP_STATE, localState);
|
||||
localContext.setAttribute(HttpClientContext.HTTP_STATE, localState);
|
||||
|
||||
HttpGet httpget = new HttpGet("http://www.google.com/");
|
||||
|
||||
System.out.println("executing request " + httpget.getURI());
|
||||
|
||||
// Pass local context as a parameter
|
||||
HttpResponse response = httpclient.execute(httpget, localContent);
|
||||
HttpResponse response = httpclient.execute(httpget, localContext);
|
||||
HttpEntity entity = response.getEntity();
|
||||
|
||||
System.out.println("----------------------------------------");
|
||||
|
|
Loading…
Reference in New Issue