-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Easy-to-use, type-safe, expandable, high-level HTTP library -- -- Easy-to-use, type-safe, expandable, high-level HTTP library. @package req @version 1.0.0 -- | The documentation below is structured in such a way that the most -- important information is presented first: you learn how to do HTTP -- requests, how to embed them in any monad you have, and then it gives -- you details about less-common things you may want to know about. The -- documentation is written with sufficient coverage of details and -- examples, and it's designed to be a complete tutorial on its own. -- -- (A modest intro goes here, click on req to start making -- requests.) -- --
-- {-# LANGUAGE OverloadedStrings #-}
--
-- module Main (main) where
--
-- import Control.Exception (throwIO)
-- import Control.Monad
-- import Data.Aeson
-- import Data.Maybe (fromJust)
-- import Data.Monoid ((<>))
-- import Data.Text (Text)
-- import GHC.Generics
-- import Network.HTTP.Req
-- import qualified Data.ByteString.Char8 as B
--
-- instance MonadHttp IO where
-- handleHttpException = throwIO
--
--
-- We will be making requests against the https://httpbin.org
-- service.
--
-- Make a GET request, grab 5 random bytes:
--
-- -- main :: IO () -- main = do -- let n :: Int -- n = 5 -- bs <- req GET (https "httpbin.org" /: "bytes" /~ n) NoReqBody bsResponse mempty -- B.putStrLn (responseBody bs) ---- -- The same, but now we use a query parameter named "seed" to -- control seed of the generator: -- --
-- main :: IO () -- main = do -- let n, seed :: Int -- n = 5 -- seed = 100 -- bs <- req GET (https "httpbin.org" /: "bytes" /~ n) NoReqBody bsResponse $ -- "seed" =: seed -- B.putStrLn (responseBody bs) ---- -- POST JSON data and get some info about the POST request: -- --
-- data MyData = MyData
-- { size :: Int
-- , color :: Text
-- } deriving (Show, Generic)
--
-- instance ToJSON MyData
-- instance FromJSON MyData
--
-- main :: IO ()
-- main = do
-- let myData = MyData
-- { size = 6
-- , color = "Green" }
-- v <- req POST (https "httpbin.org" /: "post") (ReqBodyJson myData) jsonResponse mempty
-- print (responseBody v :: Value)
--
--
-- Sending URL-encoded body:
--
--
-- main :: IO ()
-- main = do
-- let params =
-- "foo" =: ("bar" :: Text) <>
-- queryFlag "baz"
-- response <- req POST (https "httpbin.org" /: "post") (ReqBodyUrlEnc params) jsonResponse mempty
-- print (responseBody response :: Value)
--
--
-- Using various optional parameters and URL that is not known in
-- advance:
--
-- -- main :: IO () -- main = do -- -- This is an example of what to do when URL is given dynamically. Of -- -- course in a real application you may not want to use 'fromJust'. -- let (url, options) = fromJust (parseUrlHttps "https://httpbin.org/get?foo=bar") -- response <- req GET url NoReqBody jsonResponse $ -- "from" =: (15 :: Int) <> -- "to" =: (67 :: Int) <> -- basicAuth "username" "password" <> -- options <> -- contains the ?foo=bar part -- port 443 -- here you can put any port of course -- print (responseBody response :: Value) --req :: (MonadHttp m, HttpMethod method, HttpBody body, HttpResponse response, HttpBodyAllowed (AllowsBody method) (ProvidesBody body)) => method -> Url scheme -> body -> Proxy response -> Option scheme -> m response -- | A version of req that does not use one of the predefined -- instances of HttpResponse but instead allows the user to -- consume Response BodyReader manually, in a -- custom way. reqBr :: (MonadHttp m, HttpMethod method, HttpBody body, HttpBodyAllowed (AllowsBody method) (ProvidesBody body)) => method -> Url scheme -> body -> Option scheme -> (Response BodyReader -> IO a) -> m a -- | Mostly like req with respect to its arguments, but accepts a -- callback that allows to perform a request in arbitrary fashion. -- -- This function does not perform handling/wrapping exceptions, -- checking response (with httpConfigCheckResponse), and retrying. -- It only prepares Request and allows you to use it. req' :: forall m method body scheme a. (MonadHttp m, HttpMethod method, HttpBody body, HttpBodyAllowed (AllowsBody method) (ProvidesBody body)) => method -> Url scheme -> body -> Option scheme -> (Request -> Manager -> m a) -> m a -- | Perform an action using the global implicit Manager that the -- rest of the library uses. This allows to reuse connections that the -- Manager controls. withReqManager :: MonadIO m => (Manager -> m a) -> m a -- | A type class for monads that support performing HTTP requests. -- Typically, you only need to define the handleHttpException -- method unless you want to tweak HttpConfig. class MonadIO m => MonadHttp m where getHttpConfig = return def -- | This method describes how to deal with HttpException that was -- caught by the library. One option is to re-throw it if you are OK with -- exceptions, but if you prefer working with something like -- MonadError, this is the right place to pass it to -- throwError. handleHttpException :: MonadHttp m => HttpException -> m a -- | Return HttpConfig to be used when performing HTTP requests. -- Default implementation returns its def value, which is -- described in the documentation for the type. Common usage pattern with -- manually defined getHttpConfig is to return some hard-coded -- value, or a value extracted from MonadReader if a more flexible -- approach to configuration is desirable. getHttpConfig :: MonadHttp m => m HttpConfig -- | HttpConfig contains general and default settings to be used -- when making HTTP requests. data HttpConfig HttpConfig :: Maybe Proxy -> Int -> Maybe Manager -> (forall b. Request -> Response b -> ByteString -> Maybe HttpExceptionContent) -> RetryPolicy -> (forall b. RetryStatus -> Response b -> Bool) -> HttpConfig -- | Proxy to use. By default values of HTTP_PROXY and -- HTTPS_PROXY environment variables are respected, this setting -- overwrites them. Default value: Nothing. [httpConfigProxy] :: HttpConfig -> Maybe Proxy -- | How many redirects to follow when getting a resource. Default value: -- 10. [httpConfigRedirectCount] :: HttpConfig -> Int -- | Alternative Manager to use. Nothing (default value) -- means that the default implicit manager will be used (that's what you -- want in 99% of cases). [httpConfigAltManager] :: HttpConfig -> Maybe Manager -- | Function to check the response immediately after receiving the status -- and headers, before streaming of response body. The third argument is -- the beginning of response body (typically first 1024 bytes). This is -- used for throwing exceptions on non-success status codes by default -- (set to \_ _ _ -> Nothing if this behavior is not -- desirable). -- -- When the value this function returns is Nothing, nothing will -- happen. When it there is HttpExceptionContent inside -- Just, it will be thrown. -- -- Throwing is better then just returning a request with non-2xx status -- code because in that case something is wrong and we need a way to -- short-cut execution (also remember that Req retries automatically on -- request timeouts and such, so when your request fails, it's certainly -- something exceptional). The thrown exception is caught by the library -- though and is available in handleHttpException. -- -- Note: signature of this function was changed in the version -- 1.0.0. [httpConfigCheckResponse] :: HttpConfig -> forall b. Request -> Response b -> ByteString -> Maybe HttpExceptionContent -- | The retry policy to use for request retrying. By default def is -- used (see RetryPolicyM). -- -- Note: signature of this function was changed in the version -- 1.0.0. [httpConfigRetryPolicy] :: HttpConfig -> RetryPolicy -- | The function is used to decide whether to retry a request. True -- means that the request should be retried. -- -- Note: signature of this function was changed in the version -- 1.0.0. [httpConfigRetryJudge] :: HttpConfig -> forall b. RetryStatus -> Response b -> Bool -- | A monad that allows to run req in any IO-enabled monad -- without having to define new instances. data Req a -- | Run a computation in the Req monad with the given -- HttpConfig. In case of exceptional situation an -- HttpException will be thrown. runReq :: MonadIO m => HttpConfig -> Req a -> m a -- | GET method. data GET GET :: GET -- | POST method. data POST POST :: POST -- | HEAD method. data HEAD HEAD :: HEAD -- | PUT method. data PUT PUT :: PUT -- | DELETE method. This data type does not allow having request -- body with DELETE requests, as it should be. However some APIs -- may expect DELETE requests to have bodies, in that case define -- your own variation of DELETE method and allow it to have a -- body. data DELETE DELETE :: DELETE -- | TRACE method. data TRACE TRACE :: TRACE -- | CONNECT method. data CONNECT CONNECT :: CONNECT -- | OPTIONS method. data OPTIONS OPTIONS :: OPTIONS -- | PATCH method. data PATCH PATCH :: PATCH -- | A type class for types that can be used as an HTTP method. To define a -- non-standard method, follow this example that defines COPY: -- --
-- data COPY = COPY -- -- instance HttpMethod COPY where -- type AllowsBody COPY = 'CanHaveBody -- httpMethodName Proxy = "COPY" --class HttpMethod a where type AllowsBody a :: CanHaveBody where { type family AllowsBody a :: CanHaveBody; } -- | Return name of the method as a ByteString. httpMethodName :: HttpMethod a => Proxy a -> ByteString -- | Request's Url. Start constructing your Url with -- http or https specifying the scheme and host at the same -- time. Then use the (/~) and (/:) -- operators to grow the path one piece at a time. Every single piece of -- path will be url(percent)-encoded, so using (/~) and -- (/:) is the only way to have forward slashes between -- path segments. This approach makes working with dynamic path segments -- easy and safe. See examples below how to represent various Urls -- (make sure the OverloadedStrings language extension is -- enabled). -- --
-- http "httpbin.org" -- -- http://httpbin.org ---- --
-- https "httpbin.org" -- -- https://httpbin.org ---- --
-- https "httpbin.org" /: "encoding" /: "utf8" -- -- https://httpbin.org/encoding/utf8 ---- --
-- https "httpbin.org" /: "foo" /: "bar/baz" -- -- https://httpbin.org/foo/bar%2Fbaz ---- --
-- https "httpbin.org" /: "bytes" /~ (10 :: Int) -- -- https://httpbin.org/bytes/10 ---- --
-- https "юникод.рф" -- -- https://%D1%8E%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4.%D1%80%D1%84 --data Url (scheme :: Scheme) -- | Given host name, produce a Url which have “http” as its scheme -- and empty path. This also sets port to 80. http :: Text -> Url Http -- | Given host name, produce a Url which have “https” as its scheme -- and empty path. This also sets port to 443. https :: Text -> Url Https -- | Grow given Url appending a single path segment to it. Note that -- the path segment can be of any type that is an instance of -- ToHttpApiData. (/~) :: ToHttpApiData a => Url scheme -> a -> Url scheme infixl 5 /~ -- | Type-constrained version of (/~) to remove ambiguity -- in the cases when next URL piece is a Text literal. (/:) :: Url scheme -> Text -> Url scheme infixl 5 /: -- | The parseUrlHttp function provides an alternative method to get -- Url (possibly with some Options) from a -- ByteString. This is useful when you are given a URL to query -- dynamically and don't know it beforehand. The function parses -- ByteString because it's the correct type to represent a URL, as -- Url cannot contain characters outside of ASCII range, thus we -- can consider every character a Word8 value. -- -- This function only parses Url (scheme, host, path) and optional -- query parameters that are returned as Option. It does not parse -- method name or authentication info from given ByteString. parseUrlHttp :: ByteString -> Maybe (Url Http, Option scheme) -- | Just like parseUrlHttp, but expects “https” scheme. parseUrlHttps :: ByteString -> Maybe (Url Https, Option scheme) -- | This data type represents empty body of an HTTP request. This is the -- data type to use with HttpMethods that cannot have a body, as -- it's the only type for which ProvidesBody returns -- NoBody. -- -- Using of this body option does not set the Content-Type -- header. data NoReqBody NoReqBody :: NoReqBody -- | This body option allows to use a JSON object as request body—probably -- the most popular format right now. Just wrap a data type that is an -- instance of ToJSON type class and you are done: it will be -- converted to JSON and inserted as request body. -- -- This body option sets the Content-Type header to -- "application/json; charset=utf-8" value. newtype ReqBodyJson a ReqBodyJson :: a -> ReqBodyJson a -- | This body option streams request body from a file. It is expected that -- the file size does not change during the streaming. -- -- Using of this body option does not set the Content-Type -- header. newtype ReqBodyFile ReqBodyFile :: FilePath -> ReqBodyFile -- | HTTP request body represented by a strict ByteString. -- -- Using of this body option does not set the Content-Type -- header. newtype ReqBodyBs ReqBodyBs :: ByteString -> ReqBodyBs -- | HTTP request body represented by a lazy ByteString. -- -- Using of this body option does not set the Content-Type -- header. newtype ReqBodyLbs ReqBodyLbs :: ByteString -> ReqBodyLbs -- | Form URL-encoded body. This can hold a collection of parameters which -- are encoded similarly to query parameters at the end of query string, -- with the only difference that they are stored in request body. The -- similarity is reflected in the API as well, as you can use the same -- combinators you would use to add query parameters: -- (=:) and queryFlag. -- -- This body option sets the Content-Type header to -- "application/x-www-form-urlencoded" value. newtype ReqBodyUrlEnc ReqBodyUrlEnc :: FormUrlEncodedParam -> ReqBodyUrlEnc -- | An opaque monoidal value that allows to collect URL-encoded parameters -- to be wrapped in ReqBodyUrlEnc. data FormUrlEncodedParam -- | Multipart form data. Please consult the -- Network.HTTP.Client.MultipartFormData module for how to -- construct parts, then use reqBodyMultipart to create actual -- request body from the parts. reqBodyMultipart is the only way -- to get a value of the type ReqBodyMultipart, as its constructor -- is not exported on purpose. -- --
-- import Control.Exception (throwIO) -- import qualified Network.HTTP.Client.MultipartFormData as LM -- import Network.HTTP.Req -- -- instance MonadHttp IO where -- handleHttpException = throwIO -- -- main :: IO () -- main = do -- body <- -- reqBodyMultipart -- [ LM.partBS "title" "My Image" -- , LM.partFileSource "file1" "/tmp/image.jpg" -- ] -- response <- -- req POST (http "example.com" /: "post") -- body -- bsResponse -- mempty -- print $ responseBody response --data ReqBodyMultipart -- | Create ReqBodyMultipart request body from a collection of -- Parts. reqBodyMultipart :: MonadIO m => [Part] -> m ReqBodyMultipart -- | A type class for things that can be interpreted as an HTTP -- RequestBody. class HttpBody body where getRequestContentType = const Nothing -- | How to get actual RequestBody. getRequestBody :: HttpBody body => body -> RequestBody -- | This method allows to optionally specify value of -- Content-Type header that should be used with particular body -- option. By default it returns Nothing and so -- Content-Type is not set. getRequestContentType :: HttpBody body => body -> Maybe ByteString -- | The type function recognizes NoReqBody as having NoBody, -- while any other body option CanHaveBody. This forces user to -- use NoReqBody with GET method and other methods that -- should not send a body. -- | This type function allows any HTTP body if method says it -- CanHaveBody. When the method says it should have NoBody, -- the only body option to use is NoReqBody. -- -- Note: users of GHC 8.0.1 and later will see a slightly more -- friendly error message when method does not allow a body and body is -- provided. -- | The opaque Option type is a Monoid you can use to pack -- collection of optional parameters like query parameters and headers. -- See sections below to learn which Option primitives are -- available. data Option (scheme :: Scheme) -- | This operator builds a query parameter that will be included in URL of -- your request after the question sign ?. This is the same -- syntax you use with form URL encoded request bodies. -- -- This operator is defined in terms of queryParam: -- --
-- name =: value = queryParam name (pure value) --(=:) :: (QueryParam param, ToHttpApiData a) => Text -> a -> param infix 7 =: -- | Construct a flag, that is, valueless query parameter. For example, in -- the following URL "a" is a flag, while "b" is a -- query parameter with a value: -- --
-- https://httpbin.org/foo/bar?a&b=10 ---- -- This operator is defined in terms of queryParam: -- --
-- queryFlag name = queryParam name (Nothing :: Maybe ()) --queryFlag :: QueryParam param => Text -> param -- | A type class for query-parameter-like things. The reason to have an -- overloaded queryParam is to be able to use it as an -- Option and as a FormUrlEncodedParam when constructing -- form URL encoded request bodies. Having the same syntax for these -- cases seems natural and user-friendly. class QueryParam param -- | Create a query parameter with given name and value. If value is -- Nothing, it won't be included at all (i.e. you create a flag -- this way). It's recommended to use (=:) and -- queryFlag instead of this method, because they are easier to -- read. queryParam :: (QueryParam param, ToHttpApiData a) => Text -> Maybe a -> param -- | Create an Option that adds a header. Note that if you -- mappend two headers with the same names the leftmost header -- will win. This means, in particular, that you cannot create a request -- with several headers of the same name. header :: ByteString -> ByteString -> Option scheme -- | Use the given CookieJar. A CookieJar can be obtained -- from a Response record. cookieJar :: CookieJar -> Option scheme -- | The Option adds basic authentication. -- -- See also: -- https://en.wikipedia.org/wiki/Basic_access_authentication. basicAuth :: ByteString -> ByteString -> Option Https -- | An alternative to basicAuth which works for any scheme. Note -- that using basic access authentication without SSL/TLS is vulnerable -- to attacks. Use basicAuth instead unless you know what you are -- doing. basicAuthUnsafe :: ByteString -> ByteString -> Option scheme -- | The Option adds OAuth1 authentication. oAuth1 :: ByteString -> ByteString -> ByteString -> ByteString -> Option scheme -- | The Option adds an OAuth2 bearer token. This is treated by many -- services as the equivalent of a username and password. -- -- The Option is defined as: -- --
-- oAuth2Bearer token = header "Authorization" ("Bearer " <> token)
--
--
-- See also: https://en.wikipedia.org/wiki/OAuth.
oAuth2Bearer :: ByteString -> Option Https
-- | The Option adds a not-quite-standard OAuth2 bearer token (that
-- seems to be used only by GitHub). This will be treated by whatever
-- services accept it as the equivalent of a username and password.
--
-- The Option is defined as:
--
--
-- oAuth2Token token = header "Authorization" ("token" <> token)
--
--
-- See also:
-- https://developer.github.com/v3/oauth#3-use-the-access-token-to-access-the-api.
oAuth2Token :: ByteString -> Option Https
-- | Specify the port to connect to explicitly. Normally, Url you
-- use determines the default port: 80 for HTTP and 443
-- for HTTPS. This Option allows to choose an arbitrary port
-- overwriting the defaults.
port :: Int -> Option scheme
-- | This Option controls whether gzipped data should be
-- decompressed on the fly. By default everything except for
-- "application/x-tar" is decompressed, i.e. we have:
--
-- -- decompress (/= "application/x-tar") ---- -- You can also choose to decompress everything like this: -- --
-- decompress (const True) --decompress :: (ByteString -> Bool) -> Option scheme -- | Specify the number of microseconds to wait for response. The default -- value is 30 seconds (defined in ManagerSettings of connection -- Manager). responseTimeout :: Int -> Option scheme -- | HTTP version to send to the server, the default is HTTP 1.1. httpVersion :: Int -> Int -> Option scheme -- | Make a request and ignore the body of the response. data IgnoreResponse -- | Use this as the fourth argument of req to specify that you want -- it to ignore the response body. ignoreResponse :: Proxy IgnoreResponse -- | Make a request and interpret the body of the response as JSON. The -- handleHttpException method of MonadHttp instance -- corresponding to monad in which you use req will determine what -- to do in the case when parsing fails (the JsonHttpException -- constructor will be used). data JsonResponse a -- | Use this as the fourth argument of req to specify that you want -- it to return the JsonResponse interpretation. jsonResponse :: Proxy (JsonResponse a) -- | Make a request and interpret the body of the response as a strict -- ByteString. data BsResponse -- | Use this as the fourth argument of req to specify that you want -- to interpret the response body as a strict ByteString. bsResponse :: Proxy BsResponse -- | Make a request and interpret the body of the response as a lazy -- ByteString. data LbsResponse -- | Use this as the fourth argument of req to specify that you want -- to interpret the response body as a lazy ByteString. lbsResponse :: Proxy LbsResponse -- | Get the response body. responseBody :: HttpResponse response => response -> HttpResponseBody response -- | Get the response status code. responseStatusCode :: HttpResponse response => response -> Int -- | Get the response status message. responseStatusMessage :: HttpResponse response => response -> ByteString -- | Lookup a particular header from a response. responseHeader :: HttpResponse response => response -> ByteString -> Maybe ByteString -- | Get the response CookieJar. responseCookieJar :: HttpResponse response => response -> CookieJar -- | A type class for response interpretations. It allows to describe how -- to consume response from a Response BodyReader -- and produce the final result that is to be returned to the user. class HttpResponse response where type HttpResponseBody response :: * where { type family HttpResponseBody response :: *; } -- | The method describes how to get the underlying Response record. toVanillaResponse :: HttpResponse response => response -> Response (HttpResponseBody response) -- | This method describes how to consume response body and, more -- generally, obtain response value from Response -- BodyReader. -- -- Note: BodyReader is nothing but IO -- ByteString. You should call this action repeatedly until -- it yields the empty ByteString. In that case streaming of -- response is finished (which apparently leads to closing of the -- connection, so don't call the reader after it has returned the empty -- ByteString once) and you can concatenate the chunks to obtain -- the final result. (Of course you could as well stream the contents to -- a file or do whatever you want.) -- -- Note: signature of this function was changed in the version -- 1.0.0. getHttpResponse :: HttpResponse response => Response BodyReader -> IO response -- | Exceptions that this library throws. data HttpException -- | A wrapper with an HttpException from Network.HTTP.Client VanillaHttpException :: HttpException -> HttpException -- | A wrapper with Aeson-produced String describing why decoding -- failed JsonHttpException :: String -> HttpException -- | A simple type isomorphic to Bool that we only have for better -- error messages. We use it as a kind and its data constructors as -- type-level tags. -- -- See also: HttpMethod and HttpBody. data CanHaveBody -- | Indeed can have a body CanHaveBody :: CanHaveBody -- | Should not have a body NoBody :: CanHaveBody -- | A type-level tag that specifies URL scheme used (and thus if HTTPS is -- enabled). This is used to force TLS requirement for some -- authentication Options. data Scheme -- | HTTP Http :: Scheme -- | HTTPS Https :: Scheme instance GHC.Generics.Generic (Network.HTTP.Req.Url scheme) instance Data.Typeable.Internal.Typeable scheme => Data.Data.Data (Network.HTTP.Req.Url scheme) instance GHC.Show.Show (Network.HTTP.Req.Url scheme) instance GHC.Classes.Ord (Network.HTTP.Req.Url scheme) instance GHC.Classes.Eq (Network.HTTP.Req.Url scheme) instance GHC.Generics.Generic Network.HTTP.Req.Scheme instance Data.Data.Data Network.HTTP.Req.Scheme instance GHC.Show.Show Network.HTTP.Req.Scheme instance GHC.Classes.Ord Network.HTTP.Req.Scheme instance GHC.Classes.Eq Network.HTTP.Req.Scheme instance GHC.Generics.Generic Network.HTTP.Req.HttpException instance GHC.Show.Show Network.HTTP.Req.HttpException instance GHC.Base.Monoid Network.HTTP.Req.FormUrlEncodedParam instance Data.Semigroup.Semigroup Network.HTTP.Req.FormUrlEncodedParam instance Control.Monad.IO.Class.MonadIO Network.HTTP.Req.Req instance GHC.Base.Monad Network.HTTP.Req.Req instance GHC.Base.Applicative Network.HTTP.Req.Req instance GHC.Base.Functor Network.HTTP.Req.Req instance Data.Default.Class.Default Network.HTTP.Req.HttpConfig instance Network.HTTP.Req.RequestComponent Network.HTTP.Req.HttpConfig instance Control.Monad.Base.MonadBase GHC.Types.IO Network.HTTP.Req.Req instance Control.Monad.Trans.Control.MonadBaseControl GHC.Types.IO Network.HTTP.Req.Req instance Network.HTTP.Req.MonadHttp Network.HTTP.Req.Req instance Network.HTTP.Req.HttpMethod Network.HTTP.Req.GET instance Network.HTTP.Req.HttpMethod Network.HTTP.Req.POST instance Network.HTTP.Req.HttpMethod Network.HTTP.Req.HEAD instance Network.HTTP.Req.HttpMethod Network.HTTP.Req.PUT instance Network.HTTP.Req.HttpMethod Network.HTTP.Req.DELETE instance Network.HTTP.Req.HttpMethod Network.HTTP.Req.TRACE instance Network.HTTP.Req.HttpMethod Network.HTTP.Req.CONNECT instance Network.HTTP.Req.HttpMethod Network.HTTP.Req.OPTIONS instance Network.HTTP.Req.HttpMethod Network.HTTP.Req.PATCH instance Network.HTTP.Req.HttpMethod method => Network.HTTP.Req.RequestComponent (Network.HTTP.Req.Womb "method" method) instance Network.HTTP.Req.RequestComponent (Network.HTTP.Req.Url scheme) instance Network.HTTP.Req.HttpBody Network.HTTP.Req.NoReqBody instance Data.Aeson.Types.ToJSON.ToJSON a => Network.HTTP.Req.HttpBody (Network.HTTP.Req.ReqBodyJson a) instance Network.HTTP.Req.HttpBody Network.HTTP.Req.ReqBodyFile instance Network.HTTP.Req.HttpBody Network.HTTP.Req.ReqBodyBs instance Network.HTTP.Req.HttpBody Network.HTTP.Req.ReqBodyLbs instance Network.HTTP.Req.HttpBody Network.HTTP.Req.ReqBodyUrlEnc instance Network.HTTP.Req.QueryParam Network.HTTP.Req.FormUrlEncodedParam instance Network.HTTP.Req.HttpBody Network.HTTP.Req.ReqBodyMultipart instance Network.HTTP.Req.HttpBody body => Network.HTTP.Req.RequestComponent (Network.HTTP.Req.Womb "body" body) instance Data.Semigroup.Semigroup (Network.HTTP.Req.Option scheme) instance GHC.Base.Monoid (Network.HTTP.Req.Option scheme) instance Network.HTTP.Req.RequestComponent (Network.HTTP.Req.Option scheme) instance Network.HTTP.Req.QueryParam (Network.HTTP.Req.Option scheme) instance Network.HTTP.Req.HttpResponse Network.HTTP.Req.IgnoreResponse instance Data.Aeson.Types.FromJSON.FromJSON a => Network.HTTP.Req.HttpResponse (Network.HTTP.Req.JsonResponse a) instance Network.HTTP.Req.HttpResponse Network.HTTP.Req.BsResponse instance Network.HTTP.Req.HttpResponse Network.HTTP.Req.LbsResponse instance GHC.Exception.Exception Network.HTTP.Req.HttpException