Return-Path:
This constructor may be deprecated or changed to use the - * default HTTP content charset (ISO-8859-1) in the release 3.1
- * - *It is strongly recommended to use - * {@link #StringRequestEntity(String, String, String)} constructor - * instead.
- * * @see #StringRequestEntity(String, String, String) * * @param content The content to set. + * + * @deprecated use {@link #StringRequestEntity(String, String, String)} instead */ public StringRequestEntity(String content) { super(); Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestConnectionPersistence.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestConnectionPersistence.java?rev=412047&r1=412046&r2=412047&view=diff ============================================================================== --- jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestConnectionPersistence.java (original) +++ jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestConnectionPersistence.java Tue Jun 6 01:50:08 2006 @@ -78,7 +78,7 @@ this.client.setHttpConnectionManager(connman); PostMethod httppost = new PostMethod("/test/"); - httppost.setRequestEntity(new StringRequestEntity("stuff")); + httppost.setRequestEntity(new StringRequestEntity("stuff", null, null)); try { this.client.executeMethod(httppost); } finally { @@ -87,7 +87,7 @@ assertFalse(connman.getConection().isOpen()); httppost = new PostMethod("/test/"); - httppost.setRequestEntity(new StringRequestEntity("more stuff")); + httppost.setRequestEntity(new StringRequestEntity("more stuff", null, null)); try { this.client.executeMethod(httppost); } finally { @@ -105,7 +105,7 @@ this.client.setHttpConnectionManager(connman); PostMethod httppost = new PostMethod("/test/"); - httppost.setRequestEntity(new StringRequestEntity("stuff")); + httppost.setRequestEntity(new StringRequestEntity("stuff", null, null)); try { this.client.executeMethod(httppost); } finally { @@ -114,7 +114,7 @@ assertTrue(connman.getConection().isOpen()); httppost = new PostMethod("/test/"); - httppost.setRequestEntity(new StringRequestEntity("more stuff")); + httppost.setRequestEntity(new StringRequestEntity("more stuff", null, null)); try { this.client.executeMethod(httppost); } finally { @@ -132,7 +132,7 @@ this.client.setHttpConnectionManager(connman); PostMethod httppost = new PostMethod("/test/"); - httppost.setRequestEntity(new StringRequestEntity("stuff")); + httppost.setRequestEntity(new StringRequestEntity("stuff", null, null)); try { this.client.executeMethod(httppost); } finally { @@ -142,7 +142,7 @@ httppost = new PostMethod("/test/"); httppost.setRequestHeader("Connection", "close"); - httppost.setRequestEntity(new StringRequestEntity("more stuff")); + httppost.setRequestEntity(new StringRequestEntity("more stuff", null, null)); try { this.client.executeMethod(httppost); } finally { @@ -160,7 +160,7 @@ this.client.setHttpConnectionManager(connman); PostMethod httppost = new PostMethod("/test/"); - httppost.setRequestEntity(new StringRequestEntity("stuff")); + httppost.setRequestEntity(new StringRequestEntity("stuff", null, null)); try { this.client.executeMethod(httppost); } finally { @@ -170,7 +170,7 @@ httppost = new PostMethod("/test/"); httppost.setRequestHeader("Connection", "keep-alive"); - httppost.setRequestEntity(new StringRequestEntity("more stuff")); + httppost.setRequestEntity(new StringRequestEntity("more stuff", null, null)); try { this.client.executeMethod(httppost); } finally { @@ -208,7 +208,7 @@ PostMethod httppost = new PostMethod("/test/"); httppost.setRequestHeader("Connection", "close"); - httppost.setRequestEntity(new StringRequestEntity("stuff")); + httppost.setRequestEntity(new StringRequestEntity("stuff", null, null)); try { this.client.executeMethod(httppost); } finally { Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestEntityEnclosingMethod.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestEntityEnclosingMethod.java?rev=412047&r1=412046&r2=412047&view=diff ============================================================================== --- jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestEntityEnclosingMethod.java (original) +++ jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestEntityEnclosingMethod.java Tue Jun 6 01:50:08 2006 @@ -323,7 +323,7 @@ method = new PostMethod("/"); method.setRequestHeader("Content-Type", "text/plain"); - method.setRequestEntity(new StringRequestEntity("")); + method.setRequestEntity(new StringRequestEntity("", null, null)); this.client.executeMethod(method); assertEquals(200,method.getStatusLine().getStatusCode()); assertNotNull(method.getRequestHeader("Content-Length")); @@ -341,7 +341,7 @@ method = new PostMethod("/"); method.setRequestHeader("Content-Type", "text/plain"); - method.setRequestEntity(new StringRequestEntity("")); + method.setRequestEntity(new StringRequestEntity("", null, null)); method.setContentChunked(true); this.client.executeMethod(method); assertNull(method.getRequestHeader("Content-Length")); Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestNoncompliant.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestNoncompliant.java?rev=412047&r1=412046&r2=412047&view=diff ============================================================================== --- jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestNoncompliant.java (original) +++ jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestNoncompliant.java Tue Jun 6 01:50:08 2006 @@ -77,7 +77,7 @@ method.getParams().setBooleanParameter( HttpMethodParams.USE_EXPECT_CONTINUE, true); method.setRequestEntity(new StringRequestEntity( - "This is data to be sent in the body of an HTTP POST.")); + "This is data to be sent in the body of an HTTP POST.", null, null)); client.executeMethod(method); assertEquals(200, method.getStatusCode()); } Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestPostMethod.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestPostMethod.java?rev=412047&r1=412046&r2=412047&view=diff ============================================================================== --- jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestPostMethod.java (original) +++ jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestPostMethod.java Tue Jun 6 01:50:08 2006 @@ -105,7 +105,7 @@ PostMethod method = new PostMethod("/"); String stringBody = "pname1=pvalue1&pname2=pvalue2"; - method.setRequestEntity(new StringRequestEntity(stringBody)); + method.setRequestEntity(new StringRequestEntity(stringBody, null, null)); this.server.setHttpService(new EchoService()); try { this.client.executeMethod(method); Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestPostParameterEncoding.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestPostParameterEncoding.java?rev=412047&r1=412046&r2=412047&view=diff ============================================================================== --- jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestPostParameterEncoding.java (original) +++ jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestPostParameterEncoding.java Tue Jun 6 01:50:08 2006 @@ -100,7 +100,7 @@ public void testPostSetRequestBody() throws Exception { PostMethod post = new PostMethod("/foo"); String body = "this+is+the+body"; - post.setRequestEntity(new StringRequestEntity(body)); + post.setRequestEntity(new StringRequestEntity(body, null, null)); assertEquals(body, getRequestAsString(post.getRequestEntity())); } Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestProxy.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestProxy.java?rev=412047&r1=412046&r2=412047&view=diff ============================================================================== --- jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestProxy.java (original) +++ jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestProxy.java Tue Jun 6 01:50:08 2006 @@ -438,7 +438,7 @@ public void testSimplePost() throws Exception { this.server.setHttpService(new FeedbackService()); PostMethod post = new PostMethod("/"); - post.setRequestEntity(new StringRequestEntity("Like tons of stuff")); + post.setRequestEntity(new StringRequestEntity("Like tons of stuff", null, null)); try { this.client.executeMethod(post); assertEquals(HttpStatus.SC_OK, post.getStatusCode()); @@ -464,7 +464,7 @@ this.server.setRequestHandler(handlerchain); PostMethod post = new PostMethod("/"); - post.setRequestEntity(new StringRequestEntity("Like tons of stuff")); + post.setRequestEntity(new StringRequestEntity("Like tons of stuff", null, null)); try { this.client.executeMethod(post); assertEquals(HttpStatus.SC_OK, post.getStatusCode()); @@ -490,7 +490,7 @@ this.server.setRequestHandler(handlerchain); PostMethod post = new PostMethod("/"); - post.setRequestEntity(new StringRequestEntity("Like tons of stuff")); + post.setRequestEntity(new StringRequestEntity("Like tons of stuff", null, null)); try { this.client.executeMethod(post); assertEquals(HttpStatus.SC_OK, post.getStatusCode()); @@ -520,7 +520,7 @@ this.server.setRequestHandler(handlerchain); PostMethod post = new PostMethod("/"); - post.setRequestEntity(new StringRequestEntity("Like tons of stuff")); + post.setRequestEntity(new StringRequestEntity("Like tons of stuff", null, null)); try { this.client.executeMethod(post); assertEquals(HttpStatus.SC_UNAUTHORIZED, post.getStatusCode()); @@ -546,7 +546,7 @@ this.server.setRequestHandler(handlerchain); PostMethod post = new PostMethod("/"); - post.setRequestEntity(new StringRequestEntity("Like tons of stuff")); + post.setRequestEntity(new StringRequestEntity("Like tons of stuff", null, null)); try { this.client.executeMethod(post); assertEquals(HttpStatus.SC_OK, post.getStatusCode()); @@ -573,7 +573,7 @@ this.server.setRequestHandler(handlerchain); PostMethod post = new PostMethod("/"); - post.setRequestEntity(new StringRequestEntity("Like tons of stuff")); + post.setRequestEntity(new StringRequestEntity("Like tons of stuff", null, null)); try { this.client.executeMethod(post); assertEquals(HttpStatus.SC_OK, post.getStatusCode()); @@ -596,7 +596,7 @@ this.proxy.requireAuthentication(creds, "test", true); PostMethod post = new PostMethod("/"); - post.setRequestEntity(new StringRequestEntity("Like tons of stuff")); + post.setRequestEntity(new StringRequestEntity("Like tons of stuff", null, null)); try { this.client.executeMethod(post); assertEquals(HttpStatus.SC_OK, post.getStatusCode()); @@ -625,7 +625,7 @@ this.proxy.requireAuthentication(creds, "test", true); PostMethod post = new PostMethod("/"); - post.setRequestEntity(new StringRequestEntity("Like tons of stuff")); + post.setRequestEntity(new StringRequestEntity("Like tons of stuff", null, null)); try { this.client.executeMethod(post); assertEquals(HttpStatus.SC_OK, post.getStatusCode()); @@ -654,7 +654,7 @@ this.proxy.requireAuthentication(creds, "test", true); PostMethod post = new PostMethod("/"); - post.setRequestEntity(new StringRequestEntity("Like tons of stuff")); + post.setRequestEntity(new StringRequestEntity("Like tons of stuff", null, null)); try { this.client.executeMethod(post); assertEquals(HttpStatus.SC_OK, post.getStatusCode()); @@ -686,7 +686,7 @@ this.proxy.requireAuthentication(creds, "test", true); PostMethod post = new PostMethod("/"); - post.setRequestEntity(new StringRequestEntity("Like tons of stuff")); + post.setRequestEntity(new StringRequestEntity("Like tons of stuff", null, null)); try { this.client.executeMethod(post); assertEquals(HttpStatus.SC_UNAUTHORIZED, post.getStatusCode()); @@ -714,7 +714,7 @@ this.proxy.requireAuthentication(creds, "test", true); PostMethod post = new PostMethod("/"); - post.setRequestEntity(new StringRequestEntity("Like tons of stuff")); + post.setRequestEntity(new StringRequestEntity("Like tons of stuff", null, null)); try { this.client.executeMethod(post); assertEquals(HttpStatus.SC_OK, post.getStatusCode()); @@ -743,7 +743,7 @@ this.proxy.requireAuthentication(creds, "test", true); PostMethod post = new PostMethod("/"); - post.setRequestEntity(new StringRequestEntity("Like tons of stuff")); + post.setRequestEntity(new StringRequestEntity("Like tons of stuff", null, null)); try { this.client.executeMethod(post); assertEquals(HttpStatus.SC_OK, post.getStatusCode()); Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestRedirects.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestRedirects.java?rev=412047&r1=412046&r2=412047&view=diff ============================================================================== --- jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestRedirects.java (original) +++ jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestRedirects.java Tue Jun 6 01:50:08 2006 @@ -361,7 +361,7 @@ int port = this.server.getLocalPort(); this.server.setHttpService(new BasicRedirectService(host, port)); PostMethod httppost = new PostMethod("/oldlocation/"); - httppost.setRequestEntity(new StringRequestEntity("stuff")); + httppost.setRequestEntity(new StringRequestEntity("stuff", null, null)); try { this.client.executeMethod(httppost); assertEquals(HttpStatus.SC_MOVED_TEMPORARILY, httppost.getStatusCode()); Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestBasicAuth.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestBasicAuth.java?rev=412047&r1=412046&r2=412047&view=diff ============================================================================== --- jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestBasicAuth.java (original) +++ jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestBasicAuth.java Tue Jun 6 01:50:08 2006 @@ -492,7 +492,7 @@ this.server.setRequestHandler(handlerchain); PostMethod post = new PostMethod("/test/"); - post.setRequestEntity(new StringRequestEntity("Test body")); + post.setRequestEntity(new StringRequestEntity("Test body", null, null)); try { this.client.executeMethod(post); assertEquals("Test body", post.getResponseBodyAsString()); @@ -531,7 +531,7 @@ this.server.setRequestHandler(handlerchain); PutMethod put = new PutMethod("/test/"); - put.setRequestEntity(new StringRequestEntity("Test body")); + put.setRequestEntity(new StringRequestEntity("Test body", null, null)); try { this.client.executeMethod(put); assertEquals("Test body", put.getResponseBodyAsString()); --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org