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
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
- Network.HTTP.Client.connect host port secure = if secure = true then Network.HTTP.Client.connectTLS host port else Network.HTTP.Client.connectPlain host port