You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2017/05/20 02:39:04 UTC

[jira] [Comment Edited] (HTTPCLIENT-1852) Add APIs URIBuilder.localhost() and setHost(InetAddress)

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16018253#comment-16018253 ] 

Gary Gregory edited comment on HTTPCLIENT-1852 at 5/20/17 2:38 AM:
-------------------------------------------------------------------

Done for 4.6.
commit 1da8673a6e67112fde49a0c763582e8ac4f60a07
commit f030988e89f1b79ee411473c4ec29741f6a63730

For 5.0, I will also add an API for the Java 7 only {{InetAddress#getLoopbackAddress()}}:

{code:java}
    /**
     * Creates a new builder for the host {@link InetAddress#getLoopbackAddress()}.
     *
     * @since 5.0
     */
    public static URIBuilder loopbackAddress() throws UnknownHostException {
        return new URIBuilder().setHost(InetAddress.getLoopbackAddress());
    }
{code}


was (Author: garydgregory):
Done for 4.6.

For 5.0, I will also add an API for the Java 7 only {{InetAddress#getLoopbackAddress()}}:

{code:java}
    /**
     * Creates a new builder for the host {@link InetAddress#getLoopbackAddress()}.
     *
     * @since 5.0
     */
    public static URIBuilder loopbackAddress() throws UnknownHostException {
        return new URIBuilder().setHost(InetAddress.getLoopbackAddress());
    }
{code}

> Add APIs URIBuilder.localhost() and setHost(InetAddress)
> --------------------------------------------------------
>
>                 Key: HTTPCLIENT-1852
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1852
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: HttpClient (classic)
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>             Fix For: 4.6 Alpha1
>
>
> Add APIs URIBuilder.localhost() and setHost(InetAddress)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org