Artur created HTTPCLIENT-2254:
---------------------------------
Summary: Allow to use java.net.URL to create any instance of
HttpUriRequest
Key: HTTPCLIENT-2254
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2254
Project: HttpComponents HttpClient
Issue Type: Improvement
Components: HttpClient (classic)
Affects Versions: 5.2.1
Reporter: Artur
Fix For: 5.2.2
h3. Context
We use Apache Http Client v5 to communicate with a bunch of services. So the
API of a remote service (public, we don't maintain that) in some cases requires
using uncoded query parameter values and these values can be not ASCII.
h3. Example
This is the URL that we have to call
{{https://remote-service/api/directory/c6eb9ba1-a862-4f50-81a3-bf9f3f5cc94c/items?DirRef=path/someParams&Reference=значение
с кириллицей в имени}}
Creating an instance of
{{URI.create("https://remote-service/api/directory/c6eb9ba1-a862-4f50-81a3-bf9f3f5cc94c/items?DirRef=path/someParams&Reference=значение
с кириллицей в имени"); }}
throws an exception java.net.URISyntaxException
However, if we use an instance of java.net.URL it allows us to create
{{new
URL("https://remote-service/api/directory/c6eb9ba1-a862-4f50-81a3-bf9f3f5cc94c/items?DirRef=path/someParams&Reference=значение
с кириллицей в имени");}}
h3.
Suggestion
Could you adjust creating request instances for using java.net.URL class
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]