Documentation

Hale.HttpClient.Network.HTTP.Client.Connection

Connect to a host:port over plain TCP. $$\text{connectPlain} : \text{String} \to \text{UInt16} \to \text{IO Connection}$$

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Connect to a host:port over TLS (HTTPS). Creates a fresh TLS client context, performs TCP connect, then TLS handshake. Server certificate is verified against system CA trust store with SNI. $$\text{connectTLS} : \text{String} \to \text{UInt16} \to \text{IO Connection}$$

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Network.HTTP.Client.connect (host : String) (port : UInt16) (secure : Bool) :

      Connect to a host:port, choosing plain TCP or TLS based on the secure flag. $$\text{connect} : \text{String} \to \text{UInt16} \to \text{Bool} \to \text{IO Connection}$$

      Equations
      Instances For

        Default port for the given security mode: 443 for HTTPS, 80 for HTTP.

        Equations
        Instances For