Hoogle Search
Within LTS Haskell 24.38 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
http-conduit Network.HTTP.Simple A default request value, a GET request of localhost/:80, with an empty request body. Note that the default checkResponse does nothing.
getRequestHeader :: HeaderName -> Request -> [ByteString]http-conduit Network.HTTP.Simple Get all request header values for the given name
getRequestQueryString :: Request -> Queryhttp-conduit Network.HTTP.Simple Get the query string parameters
parseRequest :: MonadThrow m => String -> m Requesthttp-conduit Network.HTTP.Simple Convert a URL into a Request. This function defaults some of the values in Request, such as setting method to GET and requestHeaders to []. Since this function uses MonadThrow, the return monad can be anything that is an instance of MonadThrow, such as IO or Maybe. You can place the request method at the beginning of the URL separated by a space, e.g.:
parseRequest "POST http://httpbin.org/post"
Note that the request method must be provided as all capital letters. A Request created by this function won't cause exceptions on non-2XX response status codes. To create a request which throws on non-2XX status codes, see parseUrlThrowparseRequestThrow :: MonadThrow m => String -> m Requesthttp-conduit Network.HTTP.Simple Same as parseRequest, except will throw an HttpException in the event of a non-2XX response. This uses throwErrorStatusCodes to implement checkResponse. Exactly the same as parseUrlThrow, but has a name that is more consistent with the other parseRequest functions.
parseRequestThrow_ :: String -> Requesthttp-conduit Network.HTTP.Simple Same as parseRequestThrow, but parse errors cause an impure exception. Mostly useful for static strings which are known to be correctly formatted.
parseRequest_ :: String -> Requesthttp-conduit Network.HTTP.Simple Same as parseRequest, but parse errors cause an impure exception. Mostly useful for static strings which are known to be correctly formatted.
setRequestBasicAuth :: ByteString -> ByteString -> Request -> Requesthttp-conduit Network.HTTP.Simple Set basic auth with the given username and password
setRequestBearerAuth :: ByteString -> Request -> Requesthttp-conduit Network.HTTP.Simple Set bearer auth with the given token
setRequestBody :: RequestBody -> Request -> Requesthttp-conduit Network.HTTP.Simple Set the request body to the given RequestBody. You may want to consider using one of the convenience functions in the modules, e.g. requestBodyJSON. Note: This will not modify the request method. For that, please use requestMethod. You likely don't want the default of GET.