Hackage documentation generation is not reliable. For up to date documentation, please see:http://www.stackage.org/package/http-client.
[Index] [Quick Jump]
Name | Description | Default |
---|---|---|
network-uri | Get Network.URI from the network-uri package | Enabled |
Use-f <flag> to enable a flag, or-f -<flag> to disable that flag.More info
For package maintainers and hackage trustees
Candidates
Full tutorial docs are available at:https://github.com/snoyberg/http-client/blob/master/TUTORIAL.md
An HTTP client engine, intended as a base layer for more user-friendly packages.
This codebase has been refactored fromhttp-conduit.
Note that, if you want to make HTTPS secure connections, you should usehttp-client-tls in additionto this library.
Below is a series of cookbook recipes. A number of recipes exist elsewhere,includingNetwork.HTTP.Client
andNetwork.HTTP.Conduit
. The goal is toexpand this list over time.
Use the following approach to get proxy settings from thehttp_proxy
andhttps_proxy
environment variables.
{-# LANGUAGE OverloadedStrings #-}import Network.HTTP.Clientmain :: IO ()main = do let settings = managerSetProxy (proxyEnvironment Nothing) defaultManagerSettings man <- newManager settings let req = "http://httpbin.org" -- Note that the following settings will be completely ignored. { proxy = Just $ Proxy "localhost" 1234 } httpLbs req man >>= print