polysemy-http-0.5.0.0: Polysemy Effects for HTTP clients
Safe HaskellNone
LanguageHaskell2010

Polysemy.Http.Request

Description

 
Synopsis

Documentation

withPort :: Maybe Port -> Tls -> Method -> Host -> Path -> Body -> Request Source #

Create a request with empty headers, query and cookies.

withTls :: Tls -> Method -> Host -> Path -> Body -> Request Source #

Create a request with default port and empty headers, query and cookies.

simple :: Method -> Host -> Path -> Body -> Request Source #

Create a TLS request with default port and empty headers, query and cookies.

get :: Host -> Path -> Request Source #

Create a TLS GET request with default port and empty headers, query and cookies.

post :: Host -> Path -> Body -> Request Source #

Create a TLS POST request with default port and empty headers, query and cookies.

put :: Host -> Path -> Body -> Request Source #

Create a TLS PUT request with default port and empty headers, query and cookies.

delete :: Host -> Path -> Request Source #

Create a TLS DELETE request with default port and empty headers, query and cookies.

fromUrl :: Method -> Body -> Text -> Either Text Request Source #

Parse the URL and create a request or return a parse error.

getUrl :: Text -> Either Text Request Source #

Parse URL for a GET.

postUrl :: Body -> Text -> Either Text Request Source #

Parse URL for a POST.

putUrl :: Body -> Text -> Either Text Request Source #

Parse URL for a PUT.

deleteUrl :: Text -> Either Text Request Source #

Parse URL for a DELETE.

cookie :: Text -> Text -> Text -> Cookie Source #

Create a cookie with default values.

addCookies :: [Cookie] -> Request -> Request Source #

Add multiple cookies to a request.

addCookie :: Text -> Text -> Text -> Request -> Request Source #

Add a cookie to a request, using default values.