This function just stores the host address and port, it doesn't actually
connect to it until you send a request. The port has a default value of
0, which means that the HTTP client will use the right port according to
the protocol used (80 for HTTP, 443 for HTTPS). You should leave it like
this unless you really need a port other than the standard one, or use an
unknown protocol.
Set the target host.
This function just stores the host address and port, it doesn't actually connect to it until you send a request. The port has a default value of 0, which means that the HTTP client will use the right port according to the protocol used (80 for HTTP, 443 for HTTPS). You should leave it like this unless you really need a port other than the standard one, or use an unknown protocol.