From 6959830c703d09527b1d206b8ac764301bcb6a4a Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Wed, 3 Nov 2010 16:12:45 +0000 Subject: [PATCH] Removed reference to deprecated methods git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1030514 13f79535-47bb-0310-9956-ffa450edef68 --- .../http/examples/entity/mime/ClientMultipartFormPost.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/httpmime/src/examples/org/apache/http/examples/entity/mime/ClientMultipartFormPost.java b/httpmime/src/examples/org/apache/http/examples/entity/mime/ClientMultipartFormPost.java index f69193713..fab7546e8 100644 --- a/httpmime/src/examples/org/apache/http/examples/entity/mime/ClientMultipartFormPost.java +++ b/httpmime/src/examples/org/apache/http/examples/entity/mime/ClientMultipartFormPost.java @@ -36,6 +36,7 @@ import org.apache.http.entity.mime.MultipartEntity; import org.apache.http.entity.mime.content.FileBody; import org.apache.http.entity.mime.content.StringBody; import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.util.EntityUtils; /** * Example how to use multipart/form encoded POST request. @@ -69,11 +70,8 @@ public class ClientMultipartFormPost { System.out.println(response.getStatusLine()); if (resEntity != null) { System.out.println("Response content length: " + resEntity.getContentLength()); - System.out.println("Chunked?: " + resEntity.isChunked()); - } - if (resEntity != null) { - resEntity.consumeContent(); } + EntityUtils.consume(resEntity); } }