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(const(char)[] host, ushort port)
    class Http
    this
    (
    const(char)[] host
    ,
    ushort port = 0
    )

Parameters

host const(char)[]

Web server to connect to

port ushort

Port to use for connection

Meta