hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCORE-418) HttpHost should have a constructor for hostname and scheme
Date Sun, 31 Jan 2016 19:46:39 GMT

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

ASF GitHub Bot commented on HTTPCORE-418:
-----------------------------------------

GitHub user HendricksonJS opened a pull request:

    https://github.com/apache/httpcore/pull/20

    HTTPCORE-418: add constructor to HttpHost for hostname and scheme

    Add a new constructor that takes a hostname and port and uses the default port for that
scheme.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/HendricksonJS/httpcore trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/httpcore/pull/20.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #20
    
----
commit 37c1d1fac9dcf51142fde314434ae679469ce7e1
Author: Joshua Hendrickson <joshua.hendrickson@live.com>
Date:   2016-01-31T19:43:26Z

    HTTPCORE-418: add constructor to HttpHost for hostname and scheme with default port.

----


> HttpHost should have a constructor for hostname and scheme
> ----------------------------------------------------------
>
>                 Key: HTTPCORE-418
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-418
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore
>            Reporter: Joshua Hendrickson
>            Priority: Minor
>             Fix For: 5.0
>
>
> org.apache.http.HttpHost provides a (String, int, String) constructor to let you specify
an https configuration. However, in order to not have it include ":443" at the end of its
string representation, you need to know to pass -1 for the port parameter. For those not familiar
with the class, having a (String, String) constructor like the one below would be easier to
grok:
> new HttpHost("www.example.com", "https");
> compared with what you have to do today:
> new HttpHost("www.example.com", -1, "https");



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message