-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Conduit helpers for the req HTTP client library
--   
--   Conduit helpers for the req HTTP client library.
@package req-conduit
@version 0.1.0


-- | The module extends functionality available in <a>Network.HTTP.Req</a>
--   with Conduit helpers for streaming big request bodies.
--   
--   The package re-uses some pieces of code from the <tt>http-conduit</tt>
--   package, but not to the extent that depending on that package is
--   reasonable.
module Network.HTTP.Req.Conduit

-- | This body option streams contents of request body from given
--   <a>Source</a>. The <a>Int64</a> value is size of the data in bytes.
--   
--   Using of this body option does not set the <tt>Content-Type</tt>
--   header.
data ReqBodySource
ReqBodySource :: Int64 -> (Source IO ByteString) -> ReqBodySource

-- | Mostly like <a>req</a> with respect to its arguments, but instead of a
--   hint how to interpret response it takes a callback that allows to
--   perform a request using arbitrary code.
req' :: (MonadHttp m, HttpMethod method, HttpBody body, HttpBodyAllowed (AllowsBody method) (ProvidesBody body)) => method -> Url scheme -> body -> (Request -> Manager -> m a) -> Option scheme -> m a

-- | Perform an HTTP request and get the response as a <a>Producer</a>.
httpSource :: MonadResource m => Request -> Manager -> Producer m ByteString
instance Network.HTTP.Req.HttpBody Network.HTTP.Req.Conduit.ReqBodySource
