[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpcomponents-commits
Subject:    [httpcomponents-client] 06/08: Replaced deprecated URLEncodedUtils
From:       olegk () apache ! org
Date:       2020-09-27 10:42:24
Message-ID: 20200927104218.EF2D182926 () gitbox ! apache ! org
[Download RAW message or body]

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git

commit 0524eed4b9272c3e88447f1442db90a85d772b49
Author: Oleg Kalnichevski <olegk@apache.org>
AuthorDate: Wed Sep 16 17:17:44 2020 +0200

    Replaced deprecated URLEncodedUtils
---
 .../src/main/java/org/apache/hc/client5/http/fluent/Request.java      | 4 ++--
 .../java/org/apache/hc/client5/http/entity/UrlEncodedFormEntity.java  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Request.java \
b/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Request.java \
                index b24927d..492adb7 100644
--- a/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Request.java
+++ b/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Request.java
@@ -60,7 +60,7 @@ import org.apache.hc.core5.http.NameValuePair;
 import org.apache.hc.core5.http.io.entity.ByteArrayEntity;
 import org.apache.hc.core5.http.io.entity.FileEntity;
 import org.apache.hc.core5.http.io.entity.InputStreamEntity;
-import org.apache.hc.core5.net.URLEncodedUtils;
+import org.apache.hc.core5.net.WWWFormCodec;
 import org.apache.hc.core5.util.Timeout;
 
 /**
@@ -334,7 +334,7 @@ public class Request {
         }
         final ContentType contentType = charset != null ?
                 ContentType.APPLICATION_FORM_URLENCODED.withCharset(charset) : \
                ContentType.APPLICATION_FORM_URLENCODED;
-        final String s = URLEncodedUtils.format(paramList, \
contentType.getCharset()); +        final String s = WWWFormCodec.format(paramList, \
contentType.getCharset());  return bodyString(s, contentType);
     }
 
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/UrlEncodedFormEntity.java \
b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/UrlEncodedFormEntity.java
 index 9e18a77..156663a 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/UrlEncodedFormEntity.java
                
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/UrlEncodedFormEntity.java
 @@ -32,7 +32,7 @@ import java.util.List;
 import org.apache.hc.core5.http.ContentType;
 import org.apache.hc.core5.http.NameValuePair;
 import org.apache.hc.core5.http.io.entity.StringEntity;
-import org.apache.hc.core5.net.URLEncodedUtils;
+import org.apache.hc.core5.net.WWWFormCodec;
 
 /**
  * An entity composed of a list of url-encoded pairs.
@@ -54,7 +54,7 @@ public class UrlEncodedFormEntity extends StringEntity {
     public UrlEncodedFormEntity(
             final Iterable<? extends NameValuePair> parameters,
             final Charset charset) {
-        super(URLEncodedUtils.format(
+        super(WWWFormCodec.format(
                 parameters,
                 charset != null ? charset : \
                ContentType.APPLICATION_FORM_URLENCODED.getCharset()),
                 charset != null ? \
ContentType.APPLICATION_FORM_URLENCODED.withCharset(charset) : \
ContentType.APPLICATION_FORM_URLENCODED);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic