hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1703170 [29/38] - in /httpcomponents/site/httpcomponents-client-4.5.x: ./ fluent-hc/ fluent-hc/apidocs/ fluent-hc/apidocs/org/apache/http/client/fluent/ fluent-hc/apidocs/org/apache/http/client/fluent/class-use/ fluent-hc/xref-test/ fluent...
Date Tue, 15 Sep 2015 12:28:43 GMT
Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientProxyAuthentication.java
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientProxyAuthentication.java?rev=1703170&r1=1703169&r2=1703170&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientProxyAuthentication.java
(original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientProxyAuthentication.java
Tue Sep 15 12:28:32 2015
@@ -47,18 +47,21 @@ public class ClientProxyAuthentication {
     public static void main(String[] args) throws Exception {
         CredentialsProvider credsProvider = new BasicCredentialsProvider();
         credsProvider.setCredentials(
-                new AuthScope("localhost", 8080),
-                new UsernamePasswordCredentials("username", "password"));
+                new AuthScope("localhost", 8888),
+                new UsernamePasswordCredentials("squid", "squid"));
+        credsProvider.setCredentials(
+                new AuthScope("httpbin.org", 80),
+                new UsernamePasswordCredentials("user", "passwd"));
         CloseableHttpClient httpclient = HttpClients.custom()
                 .setDefaultCredentialsProvider(credsProvider).build();
         try {
-            HttpHost target = new HttpHost("www.verisign.com", 443, "https");
-            HttpHost proxy = new HttpHost("localhost", 8080);
+            HttpHost target = new HttpHost("httpbin.org", 80, "http");
+            HttpHost proxy = new HttpHost("localhost", 8888);
 
             RequestConfig config = RequestConfig.custom()
                 .setProxy(proxy)
                 .build();
-            HttpGet httpget = new HttpGet("/");
+            HttpGet httpget = new HttpGet("/basic-auth/user/passwd");
             httpget.setConfig(config);
 
             System.out.println("Executing request " + httpget.getRequestLine() + " to " +
target + " via " + proxy);
@@ -67,7 +70,7 @@ public class ClientProxyAuthentication {
             try {
                 System.out.println("----------------------------------------");
                 System.out.println(response.getStatusLine());
-                EntityUtils.consume(response.getEntity());
+                System.out.println(EntityUtils.toString(response.getEntity()));
             } finally {
                 response.close();
             }

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientWithRequestFuture.java
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientWithRequestFuture.java?rev=1703170&r1=1703169&r2=1703170&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientWithRequestFuture.java
(original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientWithRequestFuture.java
Tue Sep 15 12:28:32 2015
@@ -64,7 +64,7 @@ public class ClientWithRequestFuture {
             };
 
             // Simple request ...
-            HttpGet request1 = new HttpGet("http://google.com");
+            HttpGet request1 = new HttpGet("http://httpbin.org/get");
             HttpRequestFutureTask<Boolean> futureTask1 = requestExecService.execute(request1,
                     HttpClientContext.create(), handler);
             Boolean wasItOk1 = futureTask1.get();
@@ -72,7 +72,7 @@ public class ClientWithRequestFuture {
 
             // Cancel a request
             try {
-                HttpGet request2 = new HttpGet("http://google.com");
+                HttpGet request2 = new HttpGet("http://httpbin.org/get");
                 HttpRequestFutureTask<Boolean> futureTask2 = requestExecService.execute(request2,
                         HttpClientContext.create(), handler);
                 futureTask2.cancel(true);
@@ -83,7 +83,7 @@ public class ClientWithRequestFuture {
             }
 
             // Request with a timeout
-            HttpGet request3 = new HttpGet("http://google.com");
+            HttpGet request3 = new HttpGet("http://httpbin.org/get");
             HttpRequestFutureTask<Boolean> futureTask3 = requestExecService.execute(request3,
                     HttpClientContext.create(), handler);
             Boolean wasItOk3 = futureTask3.get(10, TimeUnit.SECONDS);
@@ -107,7 +107,7 @@ public class ClientWithRequestFuture {
             };
 
             // Simple request with a callback
-            HttpGet request4 = new HttpGet("http://google.com");
+            HttpGet request4 = new HttpGet("http://httpbin.org/get");
             // using a null HttpContext here since it is optional
             // the callback will be called when the task completes, fails, or is cancelled
             HttpRequestFutureTask<Boolean> futureTask4 = requestExecService.execute(request4,

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientWithResponseHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientWithResponseHandler.java?rev=1703170&r1=1703169&r2=1703170&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientWithResponseHandler.java
(original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientWithResponseHandler.java
Tue Sep 15 12:28:32 2015
@@ -47,7 +47,7 @@ public class ClientWithResponseHandler {
     public final static void main(String[] args) throws Exception {
         CloseableHttpClient httpclient = HttpClients.createDefault();
         try {
-            HttpGet httpget = new HttpGet("http://localhost/");
+            HttpGet httpget = new HttpGet("http://httpbin.org/");
 
             System.out.println("Executing request " + httpget.getRequestLine());
 

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/QuickStart.java
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/QuickStart.java?rev=1703170&r1=1703169&r2=1703170&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/QuickStart.java
(original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/QuickStart.java
Tue Sep 15 12:28:32 2015
@@ -45,7 +45,7 @@ public class QuickStart {
     public static void main(String[] args) throws Exception {
         CloseableHttpClient httpclient = HttpClients.createDefault();
         try {
-            HttpGet httpGet = new HttpGet("http://targethost/homepage");
+            HttpGet httpGet = new HttpGet("http://httpbin.org/get");
             CloseableHttpResponse response1 = httpclient.execute(httpGet);
             // The underlying HTTP connection is still held by the response object
             // to allow the response content to be streamed directly from the network socket.
@@ -64,7 +64,7 @@ public class QuickStart {
                 response1.close();
             }
 
-            HttpPost httpPost = new HttpPost("http://targethost/login");
+            HttpPost httpPost = new HttpPost("http://httpbin.org/post");
             List <NameValuePair> nvps = new ArrayList <NameValuePair>();
             nvps.add(new BasicNameValuePair("username", "vip"));
             nvps.add(new BasicNameValuePair("password", "secret"));

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/project-info.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/project-info.html?rev=1703170&r1=1703169&r2=1703170&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/project-info.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/project-info.html Tue Sep 15
12:28:32 2015
@@ -3,7 +3,7 @@
       @import url("./css/maven-base.css");
       @import url("./css/maven-theme.css");
       @import url("./css/site.css");
-    </style><link rel="stylesheet" href="./css/print.css" type="text/css" media="print"></link><meta
name="Date-Revision-yyyymmdd" content="20150604"></meta><meta http-equiv="Content-Language"
content="en"></meta></head><body class="composite">
+    </style><link rel="stylesheet" href="./css/print.css" type="text/css" media="print"></link><meta
name="Date-Revision-yyyymmdd" content="20150915"></meta><meta http-equiv="Content-Language"
content="en"></meta></head><body class="composite">
     <div id="banner">
                         <a shape="rect" id="bannerLeft" href="http://www.apache.org/">
                                         <img src="http://www.apache.org/images/asf_logo_wide.gif"
alt="Apache"></img>
@@ -19,8 +19,8 @@
             
                 
                 <div class="xleft">
-        <span id="publishDate">Last Published: 2015-06-04</span>
-                  &#160;| <span id="projectVersion">Version: 4.5</span>
+        <span id="publishDate">Last Published: 2015-09-15</span>
+                  &#160;| <span id="projectVersion">Version: 4.5.1</span>
                       </div>
             <div class="xright">                    <a shape="rect" class="externalLink"
href="http://www.apache.org/" title="Apache">Apache</a>
             |

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/project-reports.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/project-reports.html?rev=1703170&r1=1703169&r2=1703170&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/project-reports.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/project-reports.html Tue Sep
15 12:28:32 2015
@@ -3,7 +3,7 @@
       @import url("./css/maven-base.css");
       @import url("./css/maven-theme.css");
       @import url("./css/site.css");
-    </style><link rel="stylesheet" href="./css/print.css" type="text/css" media="print"></link><meta
name="Date-Revision-yyyymmdd" content="20150604"></meta><meta http-equiv="Content-Language"
content="en"></meta></head><body class="composite">
+    </style><link rel="stylesheet" href="./css/print.css" type="text/css" media="print"></link><meta
name="Date-Revision-yyyymmdd" content="20150915"></meta><meta http-equiv="Content-Language"
content="en"></meta></head><body class="composite">
     <div id="banner">
                         <a shape="rect" id="bannerLeft" href="http://www.apache.org/">
                                         <img src="http://www.apache.org/images/asf_logo_wide.gif"
alt="Apache"></img>
@@ -19,8 +19,8 @@
             
                 
                 <div class="xleft">
-        <span id="publishDate">Last Published: 2015-06-04</span>
-                  &#160;| <span id="projectVersion">Version: 4.5</span>
+        <span id="publishDate">Last Published: 2015-09-15</span>
+                  &#160;| <span id="projectVersion">Version: 4.5.1</span>
                       </div>
             <div class="xright">                    <a shape="rect" class="externalLink"
href="http://www.apache.org/" title="Apache">Apache</a>
             |

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/project-summary.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/project-summary.html?rev=1703170&r1=1703169&r2=1703170&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/project-summary.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/project-summary.html Tue Sep
15 12:28:32 2015
@@ -3,7 +3,7 @@
       @import url("./css/maven-base.css");
       @import url("./css/maven-theme.css");
       @import url("./css/site.css");
-    </style><link rel="stylesheet" href="./css/print.css" type="text/css" media="print"></link><meta
name="Date-Revision-yyyymmdd" content="20150604"></meta><meta http-equiv="Content-Language"
content="en"></meta></head><body class="composite">
+    </style><link rel="stylesheet" href="./css/print.css" type="text/css" media="print"></link><meta
name="Date-Revision-yyyymmdd" content="20150915"></meta><meta http-equiv="Content-Language"
content="en"></meta></head><body class="composite">
     <div id="banner">
                         <a shape="rect" id="bannerLeft" href="http://www.apache.org/">
                                         <img src="http://www.apache.org/images/asf_logo_wide.gif"
alt="Apache"></img>
@@ -19,8 +19,8 @@
             
                 
                 <div class="xleft">
-        <span id="publishDate">Last Published: 2015-06-04</span>
-                  &#160;| <span id="projectVersion">Version: 4.5</span>
+        <span id="publishDate">Last Published: 2015-09-15</span>
+                  &#160;| <span id="projectVersion">Version: 4.5.1</span>
                       </div>
             <div class="xright">                    <a shape="rect" class="externalLink"
href="http://www.apache.org/" title="Apache">Apache</a>
             |
@@ -97,7 +97,7 @@
 <table class="bodyTable" border="0"><tr class="a"><th colspan="1" rowspan="1">Field</th><th
colspan="1" rowspan="1">Value</th></tr><tr class="b"><td colspan="1"
rowspan="1">Name</td><td colspan="1" rowspan="1">The Apache Software Foundation</td></tr><tr
class="a"><td colspan="1" rowspan="1">URL</td><td colspan="1" rowspan="1"><a
shape="rect" class="externalLink" href="http://www.apache.org/">http://www.apache.org/</a></td></tr></table></div>
 <div class="section">
 <h3>Build Information<a shape="rect" name="Build_Information"></a></h3><a
shape="rect" name="Build_Information"></a>
-<table class="bodyTable" border="0"><tr class="a"><th colspan="1" rowspan="1">Field</th><th
colspan="1" rowspan="1">Value</th></tr><tr class="b"><td colspan="1"
rowspan="1">GroupId</td><td colspan="1" rowspan="1">org.apache.httpcomponents</td></tr><tr
class="a"><td colspan="1" rowspan="1">ArtifactId</td><td colspan="1" rowspan="1">httpclient</td></tr><tr
class="b"><td colspan="1" rowspan="1">Version</td><td colspan="1" rowspan="1">4.5</td></tr><tr
class="a"><td colspan="1" rowspan="1">Type</td><td colspan="1" rowspan="1">jar</td></tr><tr
class="b"><td colspan="1" rowspan="1">JDK Rev</td><td colspan="1" rowspan="1">1.6</td></tr></table></div></div>
+<table class="bodyTable" border="0"><tr class="a"><th colspan="1" rowspan="1">Field</th><th
colspan="1" rowspan="1">Value</th></tr><tr class="b"><td colspan="1"
rowspan="1">GroupId</td><td colspan="1" rowspan="1">org.apache.httpcomponents</td></tr><tr
class="a"><td colspan="1" rowspan="1">ArtifactId</td><td colspan="1" rowspan="1">httpclient</td></tr><tr
class="b"><td colspan="1" rowspan="1">Version</td><td colspan="1" rowspan="1">4.5.1</td></tr><tr
class="a"><td colspan="1" rowspan="1">Type</td><td colspan="1" rowspan="1">jar</td></tr><tr
class="b"><td colspan="1" rowspan="1">JDK Rev</td><td colspan="1" rowspan="1">1.6</td></tr></table></div></div>
       </div>
     </div>
     <div class="clear">



Mime
View raw message