Http -package:HTTP

Support for HTTP response encoding.
http://
HTTP
Here is an example GET request that streams the response body to standard output:
import Pipes
import Pipes.HTTP
import qualified Pipes.ByteString as PB  -- from `pipes-bytestring`

main = do
req <- parseUrlThrow "https://www.example.com"

manager <- withManager tlsManagerSettings

withHTTP req manager $ \resp ->
runEffect $ responseBody resp >-> PB.stdout
Here is an example POST request that also streams the request body from standard input:
{-# LANGUAGE OverloadedStrings #-}

import Pipes
import Pipes.HTTP
import qualified Pipes.ByteString as PB

main = do
req <- parseUrlThrow "https://www.example.com"

let req' = req
{ method = "POST"
, requestBody = stream PB.stdin
}

manager <- newManager tlsManagerSettings

withHTTP req' manager $ \resp ->
runEffect $ responseBody resp >-> PB.stdout
For non-streaming request bodies, study the RequestBody type, which also accepts strict / lazy bytestrings or builders.
Implementation of HttpLib using cabal-install's own HttpTransport
http://
libcurl input
A layer on top of the HTTP functions in the http-client library which lifts the return values to the typeclasses we are using in this library. Non 200 responses are converted into MonadError errors.
HTTP
Implementation of HttpClient using the HTTP package
Miscellaneous HTTP Utilities.
Helpers for dealing with HTTP requests.
guard which checks that an insecure connection was made via http:// Example:
handler :: ServerPart Response
handler =
do http
...
Parse an HTTP(S) import This corresponds to the http rule from the official grammar
Given host name, produce a Url which has “http” as its scheme and empty path. This also sets port to 80.