This module contains a very basic HTTP client. At the moment, it doesn't even handle redirects for you.
Note that, in order to use SSL, you need to have the root CA certificates
in a PEM file in
etcssh/certs.pem and you need to have wrapped your
main function in
the headers to use. This function will set the Host
header for you in the case that the URL has a
hostname in it. If in doubt, use
the resource to fetch
|-> IO (Connection, Reply, Maybe Source)|
the connection (which you have to close once you are done
Fetch an HTTP(S) entity.
Construct a connection to the correct host for the given URL. (i.e. resolve the hostname and create a TCP connection to the correct port).
Note that the DNS resolution (if any) doesn't block the whole process.
Setup the transport (i.e. SSL) for the given URL. In the case of a HTTP scheme, this just wraps the socket in a Connection.