[
https://issues.apache.org/jira/browse/HTTPCLIENT-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Remis updated HTTPCLIENT-1480:
------------------------------
Description:
This issue relates to HTTPCORE-365 (which was the original issue about this
topic). What I actually want to achieve is to have a convenience method to
allow us to call the *viaProxy* method with a String as parameter. E.g.:
{code:java}
Request.Get(uri).viaProxy("localhost:8080").execute();
{code}
Notes about the attached patch:
- I did not know where to put the new method *protected static HttpHost
parseProxy(String proxy)* so I put it inside Request.java
- the parseProxy(String) is static because it is a utility class, so you can
move to a more "appropriate place" and anyone can use it for other use-cases.
- following the suggestion of Gary Gregory, I made it compatible with IPv6
(following links below):
--
http://en.wikipedia.org/wiki/IPv6_address#Literal_IPv6_addresses_in_network_resource_identifiers
-- http://stackoverflow.com/questions/186829/ipv6-and-ports
--
http://serverfault.com/questions/205793/how-can-one-distinguish-the-host-and-the-port-in-an-ipv6-url
Hope to see it in 4.3.4 :-).
was:
This issue relates to HTTPCORE-365 (which was the original issue about this
topic). What I actually want to achieve is to have a convenience method to
allow us to call the *viaProxy* method with a String as parameter:
{code:java}
Request.Get(uri).viaProxy("localhost:8080").execute();
{code}
> Provide a convenience method to parse a proxy with format localhost:port
> ------------------------------------------------------------------------
>
> Key: HTTPCLIENT-1480
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1480
> Project: HttpComponents HttpClient
> Issue Type: New Feature
> Components: Fluent HC
> Affects Versions: 4.3.3
> Reporter: Remis
> Priority: Minor
> Fix For: 4.3.4
>
> Attachments: HTTPCLIENT-1480.patch
>
>
> This issue relates to HTTPCORE-365 (which was the original issue about this
> topic). What I actually want to achieve is to have a convenience method to
> allow us to call the *viaProxy* method with a String as parameter. E.g.:
> {code:java}
> Request.Get(uri).viaProxy("localhost:8080").execute();
> {code}
> Notes about the attached patch:
> - I did not know where to put the new method *protected static HttpHost
> parseProxy(String proxy)* so I put it inside Request.java
> - the parseProxy(String) is static because it is a utility class, so you can
> move to a more "appropriate place" and anyone can use it for other use-cases.
> - following the suggestion of Gary Gregory, I made it compatible with IPv6
> (following links below):
> --
> http://en.wikipedia.org/wiki/IPv6_address#Literal_IPv6_addresses_in_network_resource_identifiers
> -- http://stackoverflow.com/questions/186829/ipv6-and-ports
> --
> http://serverfault.com/questions/205793/how-can-one-distinguish-the-host-and-the-port-in-an-ipv6-url
> Hope to see it in 4.3.4 :-).
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]