Http.this

Construct the HTTP client with the target host.

This is equivalent to calling setHost(host, port). 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.

  1. this()
  2. this(string host, ushort port = 0)
    class Http
    this
    (
    string host
    ,
    ushort port = 0
    )

Parameters

host
Type: string

Web server to connect to

port
Type: ushort

Port to use for connection

Meta