hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r528429 - in /jakarta/httpcomponents/httpcore/trunk/module-nio/src: examples/org/apache/http/examples/nio/NHttpClient.java test/java/org/apache/http/nio/protocol/TestNIOHttp.java
Date Fri, 13 Apr 2007 10:32:43 GMT
Author: olegk
Date: Fri Apr 13 03:32:39 2007
New Revision: 528429

URL: http://svn.apache.org/viewvc?view=rev&rev=528429
Log:
Removed HttpGet, HttpHead, and HttpPost classes from HttpCore

Modified:
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java?view=diff&rev=528429&r1=528428&r2=528429
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
Fri Apr 13 03:32:39 2007
@@ -42,9 +42,9 @@
 import org.apache.http.HttpResponse;
 import org.apache.http.impl.DefaultConnectionReuseStrategy;
 import org.apache.http.params.BasicHttpParams;
-import org.apache.http.message.HttpGet;
 import org.apache.http.impl.nio.DefaultClientIOEventDispatch;
 import org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor;
+import org.apache.http.message.BasicHttpRequest;
 import org.apache.http.nio.protocol.BufferingHttpClientHandler;
 import org.apache.http.nio.protocol.EventListener;
 import org.apache.http.nio.protocol.HttpRequestExecutionHandler;
@@ -152,7 +152,7 @@
                 System.out.println("--------------");
                 System.out.println("Sending request to " + targetHost);
                 System.out.println("--------------");
-                return new HttpGet("/");
+                return new BasicHttpRequest("GET", "/");
             } else {
                 // Return null to terminate the connection
                 return null;

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java?view=diff&rev=528429&r1=528428&r2=528429
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java
Fri Apr 13 03:32:39 2007
@@ -48,8 +48,8 @@
 import org.apache.http.HttpVersion;
 import org.apache.http.entity.ByteArrayEntity;
 import org.apache.http.entity.StringEntity;
-import org.apache.http.message.HttpGet;
-import org.apache.http.message.HttpPost;
+import org.apache.http.message.BasicHttpEntityEnclosingRequest;
+import org.apache.http.message.BasicHttpRequest;
 import org.apache.http.nio.NHttpConnection;
 import org.apache.http.nio.mockup.TestHttpClient;
 import org.apache.http.nio.mockup.TestHttpServer;
@@ -164,9 +164,9 @@
 
             public HttpRequest submitRequest(final HttpContext context) {
                 int i = ((Integer) context.getAttribute("REQ-COUNT")).intValue();
-                HttpGet get = null;
+                BasicHttpRequest get = null;
                 if (i < reqNo) {
-                    get = new HttpGet("/?" + i);
+                    get = new BasicHttpRequest("GET", "/?" + i);
                     context.setAttribute("REQ-COUNT", new Integer(i + 1));
                 }
                 return get;
@@ -295,9 +295,9 @@
 
             public HttpRequest submitRequest(final HttpContext context) {
                 int i = ((Integer) context.getAttribute("REQ-COUNT")).intValue();
-                HttpPost post = null;
+                BasicHttpEntityEnclosingRequest post = null;
                 if (i < reqNo) {
-                    post = new HttpPost("/?" + i);
+                    post = new BasicHttpEntityEnclosingRequest("POST", "/?" + i);
                     byte[] data = (byte[]) testData.get(i);
                     ByteArrayEntity outgoing = new ByteArrayEntity(data);
                     post.setEntity(outgoing);
@@ -429,9 +429,9 @@
 
             public HttpRequest submitRequest(final HttpContext context) {
                 int i = ((Integer) context.getAttribute("REQ-COUNT")).intValue();
-                HttpPost post = null;
+                BasicHttpEntityEnclosingRequest post = null;
                 if (i < reqNo) {
-                    post = new HttpPost("/?" + i);
+                    post = new BasicHttpEntityEnclosingRequest("POST", "/?" + i);
                     byte[] data = (byte[]) testData.get(i);
                     ByteArrayEntity outgoing = new ByteArrayEntity(data);
                     outgoing.setChunked(true);
@@ -569,9 +569,9 @@
 
             public HttpRequest submitRequest(final HttpContext context) {
                 int i = ((Integer) context.getAttribute("REQ-COUNT")).intValue();
-                HttpPost post = null;
+                BasicHttpEntityEnclosingRequest post = null;
                 if (i < reqNo) {
-                    post = new HttpPost("/?" + i);
+                    post = new BasicHttpEntityEnclosingRequest("POST", "/?" + i);
                     byte[] data = (byte[]) testData.get(i);
                     ByteArrayEntity outgoing = new ByteArrayEntity(data);
                     post.setEntity(outgoing);
@@ -705,9 +705,9 @@
 
             public HttpRequest submitRequest(final HttpContext context) {
                 int i = ((Integer) context.getAttribute("REQ-COUNT")).intValue();
-                HttpPost post = null;
+                BasicHttpEntityEnclosingRequest post = null;
                 if (i < reqNo) {
-                    post = new HttpPost("/?" + i);
+                    post = new BasicHttpEntityEnclosingRequest("POST", "/?" + i);
                     byte[] data = (byte[]) testData.get(i);
                     ByteArrayEntity outgoing = new ByteArrayEntity(data);
                     outgoing.setChunked(true);
@@ -844,9 +844,9 @@
 
             public HttpRequest submitRequest(final HttpContext context) {
                 int i = ((Integer) context.getAttribute("REQ-COUNT")).intValue();
-                HttpPost post = null;
+                BasicHttpEntityEnclosingRequest post = null;
                 if (i < reqNo) {
-                    post = new HttpPost("/");
+                    post = new BasicHttpEntityEnclosingRequest("POST", "/");
                     post.addHeader("Secret", Integer.toString(i));
                     ByteArrayEntity outgoing = new ByteArrayEntity(
                             EncodingUtils.getAsciiBytes("No content")); 



Mime
View raw message