hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r292253 - in /jakarta/httpclient/trunk/http-common/src: examples/org/apache/http/examples/ java/org/apache/http/message/
Date Wed, 28 Sep 2005 18:52:46 GMT
Author: olegk
Date: Wed Sep 28 11:52:35 2005
New Revision: 292253

URL: http://svn.apache.org/viewcvs?rev=292253&view=rev
Log:
Simpler names for standard HTTP GET and POST classes

Added:
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpGet.java
      - copied, changed from r292248, jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpGetRequest.java
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpPost.java
      - copied, changed from r292248, jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpPostRequest.java
Removed:
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpGetRequest.java
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpPostRequest.java
Modified:
    jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpGet.java
    jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpPost.java
    jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/HttpRequestExecutorDemo.java

Modified: jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpGet.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpGet.java?rev=292253&r1=292252&r2=292253&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpGet.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpGet.java
Wed Sep 28 11:52:35 2005
@@ -39,7 +39,7 @@
 import org.apache.http.impl.DefaultHttpParams;
 import org.apache.http.impl.io.PlainSocketFactory;
 import org.apache.http.io.SocketFactory;
-import org.apache.http.message.HttpGetRequest;
+import org.apache.http.message.HttpGet;
 import org.apache.http.params.HttpParams;
 
 /**
@@ -67,7 +67,7 @@
                     "/somewhere%20in%20pampa"};
             
             for (int i = 0; i < targets.length; i++) {
-                HttpGetRequest request = new HttpGetRequest(targets[i]);
+                HttpGet request = new HttpGet(targets[i]);
                 request.setHeader(new Header("Host", host.toHostString()));
                 request.setHeader(new Header("User-Agent", "Elemental HTTP client"));
                 request.setHeader(new Header("Connection", "Keep-Alive"));

Modified: jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpPost.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpPost.java?rev=292253&r1=292252&r2=292253&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpPost.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpPost.java
Wed Sep 28 11:52:35 2005
@@ -45,7 +45,7 @@
 import org.apache.http.impl.DefaultHttpParams;
 import org.apache.http.impl.io.PlainSocketFactory;
 import org.apache.http.io.SocketFactory;
-import org.apache.http.message.HttpPostRequest;
+import org.apache.http.message.HttpPost;
 import org.apache.http.params.HttpParams;
 
 /**
@@ -79,7 +79,7 @@
             };
             
             for (int i = 0; i < requestBodies.length; i++) {
-                HttpPostRequest request = new HttpPostRequest("/httpclienttest/body");
+                HttpPost request = new HttpPost("/httpclienttest/body");
                 request.setHeader(new Header("Host", host.toHostString()));
                 request.setHeader(new Header("User-Agent", "Elemental HTTP client"));
                 request.setHeader(new Header("Connection", "Keep-Alive"));

Modified: jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/HttpRequestExecutorDemo.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/HttpRequestExecutorDemo.java?rev=292253&r1=292252&r2=292253&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/HttpRequestExecutorDemo.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/HttpRequestExecutorDemo.java
Wed Sep 28 11:52:35 2005
@@ -40,7 +40,7 @@
 import org.apache.http.impl.DefaultHttpParams;
 import org.apache.http.impl.io.PlainSocketFactory;
 import org.apache.http.io.SocketFactory;
-import org.apache.http.message.HttpGetRequest;
+import org.apache.http.message.HttpGet;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpProtocolParams;
 import org.apache.http.protocol.RequestConnControl;
@@ -81,7 +81,7 @@
         HttpHost host = new HttpHost("www.yahoo.com");
         HttpClientConnection conn = new DefaultHttpClientConnection(host);
         try {
-            HttpGetRequest request1 = new HttpGetRequest("/");
+            HttpGet request1 = new HttpGet("/");
             HttpResponse response1 = httpexecutor.execute(request1, conn);
             System.out.println("<< Response: " + response1.getStatusLine());
             System.out.println(EntityConsumer.toString(response1.getEntity()));
@@ -89,7 +89,7 @@
             if (conn.isOpen()) {
                 System.out.println("Connection kept alive...");
             }
-            HttpGetRequest request2 = new HttpGetRequest("/stuff");
+            HttpGet request2 = new HttpGet("/stuff");
             HttpResponse response2 = httpexecutor.execute(request2, conn);
             System.out.println("<< Response: " + response2.getStatusLine());
             System.out.println(EntityConsumer.toString(response2.getEntity()));

Copied: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpGet.java
(from r292248, jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpGetRequest.java)
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpGet.java?p2=jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpGet.java&p1=jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpGetRequest.java&r1=292248&r2=292253&rev=292253&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpGetRequest.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpGet.java Wed
Sep 28 11:52:35 2005
@@ -38,11 +38,11 @@
  * 
  * @since 4.0
  */
-public class HttpGetRequest extends BasicHttpRequest {
+public class HttpGet extends BasicHttpRequest {
 
     public static String METHOD_NAME = "GET";
     
-    public HttpGetRequest(final String uri) {
+    public HttpGet(final String uri) {
         super(METHOD_NAME, uri);
     }
     

Copied: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpPost.java
(from r292248, jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpPostRequest.java)
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpPost.java?p2=jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpPost.java&p1=jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpPostRequest.java&r1=292248&r2=292253&rev=292253&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpPostRequest.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/message/HttpPost.java Wed
Sep 28 11:52:35 2005
@@ -38,11 +38,11 @@
  * 
  * @since 4.0
  */
-public class HttpPostRequest extends BasicHttpEntityEnclosingRequest {
+public class HttpPost extends BasicHttpEntityEnclosingRequest {
 
     public static String METHOD_NAME = "POST";
     
-    public HttpPostRequest(final String uri) {
+    public HttpPost(final String uri) {
         super(METHOD_NAME, uri);
     }
     



Mime
View raw message