You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/01/31 20:46:39 UTC
[jira] [Commented] (HTTPCORE-418) HttpHost should have a
constructor for hostname and scheme
[ 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 <jo...@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