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:
Oleg Kalnichevski 2007-07-11 08:38:40 +00:00
parent 0a7a2b6c72
commit fc9772e6b1
1 changed files with 3 additions and 3 deletions

View File

@ -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("----------------------------------------");