Function HTTPClient.connectToHost

Connects to a host. This needs to be done before any requests are sent. The host should not have http:// prepended but will strip the protocol identifier if provided. If no port is specified (or -1 is used), it is automatically set to 80 for HTTP and 443 for HTTPS (if use_ssl is enabled). verify_host will check the SSL identity of the host if set to true.

godot.core.defs.GodotError connectToHost (
  const(String) host,
  const(long) port = -1L,
  const(bool) use_ssl = false,
  const(bool) verify_host = true
) nothrow @nogc;