Here is the URL:
https://landfill.bugzilla.org/bugzilla-tip/
In my code I have this:
Server server = new Server(host, port, path);
From the URL, what is host, what is port and what is path? What are the input values of the method?
Here is the URL:
https://landfill.bugzilla.org/bugzilla-tip/
In my code I have this:
Server server = new Server(host, port, path);
From the URL, what is host, what is port and what is path? What are the input values of the method?
Host: landfill.bugzilla.org
Port: 443 (default)
Path: bugzilla-tip
http://tools.ietf.org/html/rfc1738
landfill.bugzilla.org
443
(HTTPS)/bugzilla-tip
for more details please read this
Unfortunately the other answers in this question can be slightly misleading. Referring landfill.bugzilla.org
to as host
is correct in this specific example, but if the port was other than 443
then it would be incorrect.
https://
by default uses port 443
, so you may omit it in the URL
, otherwise it would of looked like this https://landfill.bugzilla.org:443/bugzilla-tip
:
https://
landfill.bugzilla.org
443
landfill.bugzilla.org:443
bugzilla-tip
host
and hostname
are not the same! It's only the "same" when the default ports on the protocol are being used!
More info: https://tools.ietf.org/html/rfc1738