- data Request = Request {
- host :: ByteString
- port :: Int
- secure :: Bool
- requestHeaders :: [(ByteString, ByteString)]
- path :: ByteString
- queryString :: [(ByteString, ByteString)]
- requestBody :: ByteString
- method :: ByteString
- data Response a = Response {
- statusCode :: Int
- responseHeaders :: [(ByteString, ByteString)]
- responseBody :: a
- http :: Request -> Iteratee ByteString IO a -> IO (Response a)
- parseUrl :: Failure InvalidUrlException m => String -> m Request
- httpLbs :: Request -> IO (Response ByteString)
- simpleHttp :: String -> IO (Response ByteString)
- withHttpEnumerator :: IO a -> IO a
Documentation
Request | |
|
Response | |
|
simpleHttp :: String -> IO (Response ByteString)Source
withHttpEnumerator :: IO a -> IO aSource
The OpenSSL library requires some initialization of variables to be used,
and therefore you must call withOpenSSL
before using any of its functions.
As this library uses OpenSSL, you must use withOpenSSL
as well. (As a side
note, you'll also want to use the withSocketsDo function for network
activity.)
To future-proof this package against switching to different SSL libraries,
we re-export withOpenSSL
under this name. You can call this function as
early as you like; in fact, simply wrapping the do block of your main
function is probably best.