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


-- | Simple wrapper to use wreq without Strings
--   
--   This library wraps all functions from <tt>Network.Wreq</tt> which
--   expects a <a>String</a> and replaces the <a>String</a> Type with the
--   <a>Network.Wreq.StringLess.StringLike</a> Type-Class.
--   
--   Instances for <a>Network.Wreq.StringLess.StringLike</a> are given for:
--   
--   <ul>
--   <li><a>Data.Text</a></li>
--   <li><a>Data.Text.Lazy</a></li>
--   <li><a>Data.ByteString.UTF8</a></li>
--   <li><a>Data.ByteString.Lazy.UTF8</a></li>
--   </ul>
--   
--   So you can use any of this types instead of <a>String</a>.
--   
--   To use this library, replace your the <tt>wreq</tt> dependency from
--   your <tt>cabal</tt> file with <tt>wreq-stringless</tt> and import
--   <a>Network.Wreq.StringLess</a> instead of <tt>Network.Wreq</tt>.
--   
--   The '0.5.9.x' version of this library wraps the '0.5.x.x' version of
--   <tt>wreq</tt>.
--   
--   see
--   <a>https://github.com/j-keck/wreq-stringless/tree/master/examples</a>
--   for examples.
@package wreq-stringless
@version 0.5.9.1


-- | This module re-exports anything from <tt>Network.Wreq.Cache</tt>.
--   
--   see
--   <a>https://hackage.haskell.org/package/wreq/docs/Network-Wreq-Cache.html</a>
module Network.Wreq.StringLess.Cache


-- | This module re-exports anything from
--   <tt>Network.Wreq.Cache.Store</tt>.
--   
--   see
--   <a>https://hackage.haskell.org/package/wreq/docs/Network-Wreq-Cache-Store.html</a>
module Network.Wreq.StringLess.Cache.Store


-- | This module re-exports anything from <tt>Network.Wreq.Lens</tt>.
--   
--   see
--   <a>https://hackage.haskell.org/package/wreq/docs/Network-Wreq-Lens.html</a>
module Network.Wreq.StringLess.Lens


-- | Simple Type-Class to use string-like datatypes instead of
--   <a>String</a>.
module Network.Wreq.StringLess.StringLike
class IsString s => StringLike s
toString :: StringLike s => s -> String
instance Network.Wreq.StringLess.StringLike.StringLike Data.Text.Internal.Text
instance Network.Wreq.StringLess.StringLike.StringLike Data.Text.Internal.Lazy.Text
instance Network.Wreq.StringLess.StringLike.StringLike Data.ByteString.Internal.ByteString
instance Network.Wreq.StringLess.StringLike.StringLike Data.ByteString.Lazy.Internal.ByteString


-- | Use this module instead of <tt>Network.Wreq.Session</tt> to use
--   string-like datatypes.
--   
--   see
--   <a>https://hackage.haskell.org/package/wreq/docs/Network-Wreq-Session.html</a>
module Network.Wreq.StringLess.Session

-- | A session that spans multiple requests. This is responsible for cookie
--   management and TCP connection reuse.
data Session

-- | Create a <a>Session</a>.
--   
--   This session manages cookies and uses default session manager
--   configuration.
newSession :: IO Session

-- | Create a session.
--   
--   This uses the default session manager settings, but does not manage
--   cookies. It is intended for use with REST-like HTTP-based APIs, which
--   typically do not use cookies.
newAPISession :: IO Session

-- | Create a <a>Session</a>, passing it to the given function. The
--   <a>Session</a> will no longer be valid after that function returns.
--   
--   This session manages cookies and uses default session manager
--   configuration.
withSession :: () => Session -> IO a -> IO a

-- | Create a session.
--   
--   This uses the default session manager settings, but does not manage
--   cookies. It is intended for use with REST-like HTTP-based APIs, which
--   typically do not use cookies.
withAPISession :: () => Session -> IO a -> IO a

-- | Create a session, using the given cookie jar and manager settings.
newSessionControl :: Maybe CookieJar -> ManagerSettings -> IO Session

-- | Create a session, using the given manager settings. This session
--   manages cookies.
withSessionWith :: () => ManagerSettings -> Session -> IO a -> IO a

-- | Create a session, using the given cookie jar and manager settings.
withSessionControl :: () => Maybe CookieJar -> ManagerSettings -> Session -> IO a -> IO a

-- | Extract current <a>CookieJar</a> from a <a>Session</a>
getSessionCookieJar :: Session -> IO Maybe CookieJar
get :: StringLike s => Session -> s -> IO (Response ByteString)
getWith :: StringLike s => Options -> Session -> s -> IO (Response ByteString)
post :: StringLike s => Postable a => Session -> s -> a -> IO (Response ByteString)
postWith :: StringLike s => Postable a => Options -> Session -> s -> a -> IO (Response ByteString)
head_ :: StringLike s => Session -> s -> IO (Response ())
headWith :: StringLike s => Options -> Session -> s -> IO (Response ())
options :: StringLike s => Session -> s -> IO (Response ())
optionsWith :: StringLike s => Options -> Session -> s -> IO (Response ())
put :: StringLike s => Putable a => Session -> s -> a -> IO (Response ByteString)
putWith :: StringLike s => Putable a => Options -> Session -> s -> a -> IO (Response ByteString)
delete :: StringLike s => Session -> s -> IO (Response ByteString)
deleteWith :: StringLike s => Options -> Session -> s -> IO (Response ByteString)
customMethod :: StringLike s => s -> Session -> s -> IO (Response ByteString)
customMethodWith :: StringLike s => s -> Options -> Session -> s -> IO (Response ByteString)
customPayloadMethodWith :: (Postable a, StringLike s) => s -> Options -> Session -> s -> a -> IO (Response ByteString)
customHistoriedMethodWith :: StringLike s => s -> Options -> Session -> s -> IO (HistoriedResponse ByteString)
customHistoriedPayloadMethodWith :: (Postable a, StringLike s) => s -> Options -> Session -> s -> a -> IO (HistoriedResponse ByteString)
seshRun :: Lens' Session Session -> Run Body -> Run Body


-- | Use this module instead of <tt>Network.Wreq</tt> to use string-like
--   datatypes.
--   
--   see
--   <a>https://hackage.haskell.org/package/wreq/docs/Network-Wreq.html</a>
module Network.Wreq.StringLess
get :: StringLike s => s -> IO (Response ByteString)
getWith :: StringLike s => Options -> s -> IO (Response ByteString)
post :: StringLike s => Postable a => s -> a -> IO (Response ByteString)
postWith :: StringLike s => Postable a => Options -> s -> a -> IO (Response ByteString)
head_ :: StringLike s => s -> IO (Response ())
headWith :: StringLike s => Options -> s -> IO (Response ())
options :: StringLike s => s -> IO (Response ())
optionsWith :: StringLike s => Options -> s -> IO (Response ())
put :: StringLike s => Putable a => s -> a -> IO (Response ByteString)
putWith :: StringLike s => Putable a => Options -> s -> a -> IO (Response ByteString)
delete :: StringLike s => s -> IO (Response ByteString)
deleteWith :: StringLike s => Options -> s -> IO (Response ByteString)
customMethod :: StringLike s => s -> s -> IO (Response ByteString)
customMethodWith :: StringLike s => s -> Options -> s -> IO (Response ByteString)
customHistoriedMethod :: StringLike s => s -> s -> IO (HistoriedResponse ByteString)
customHistoriedMethodWith :: StringLike s => s -> Options -> s -> IO (HistoriedResponse ByteString)
customPayloadMethod :: StringLike s => Postable a => s -> s -> a -> IO (Response ByteString)
customPayloadMethodWith :: StringLike s => Postable a => s -> Options -> s -> a -> IO (Response ByteString)
customHistoriedPayloadMethod :: (Postable a, StringLike s) => s -> s -> a -> IO (HistoriedResponse ByteString)
customHistoriedPayloadMethodWith :: (Postable a, StringLike s) => s -> Options -> s -> a -> IO (HistoriedResponse ByteString)
foldGet :: StringLike s => (a -> ByteString -> IO a) -> a -> s -> IO a
foldGetWith :: StringLike s => Options -> (a -> ByteString -> IO a) -> a -> s -> IO a

-- | Options for configuring a client.
data Options
defaults :: Options

-- | A lens onto configuration of the connection manager provided by the
--   http-client package.
--   
--   In this example, we enable the use of OpenSSL for (hopefully) secure
--   connections:
--   
--   <pre>
--   import <a>OpenSSL.Session</a> (<a>context</a>)
--   import <a>Network.HTTP.Client.OpenSSL</a>
--   
--   let opts = <a>defaults</a> <a>&amp;</a> <a>manager</a> <a>.~</a> Left (<a>opensslManagerSettings</a> <a>context</a>)
--   <a>withOpenSSL</a> $
--     <a>getWith</a> opts "https://httpbin.org/get"
--    
--   </pre>
--   
--   In this example, we also set the response timeout to 10000
--   microseconds:
--   
--   <pre>
--   import <a>OpenSSL.Session</a> (<a>context</a>)
--   import <a>Network.HTTP.Client.OpenSSL</a>
--   import <a>Network.HTTP.Client</a> (<a>defaultManagerSettings</a>, <a>managerResponseTimeout</a>)
--   
--   let opts = <a>defaults</a> <a>&amp;</a> <a>manager</a> <a>.~</a> Left (<a>opensslManagerSettings</a> <a>context</a>)
--                       <a>&amp;</a> <a>manager</a> <a>.~</a> Left (<a>defaultManagerSettings</a> { <a>managerResponseTimeout</a> = Just 10000 } )
--   
--   <a>withOpenSSL</a> $
--     <a>getWith</a> opts "https://httpbin.org/get"
--    
--   </pre>
manager :: Lens' Options Either ManagerSettings Manager

-- | A lens onto all headers with the given name (there can legitimately be
--   zero or more).
--   
--   Example:
--   
--   <pre>
--   let opts = <a>defaults</a> <a>&amp;</a> <a>header</a> "Accept" <a>.~</a> ["*/*"]
--   <a>getWith</a> opts "http://httpbin.org/get"
--    
--   </pre>
header :: HeaderName -> Lens' Options [ByteString]

-- | A lens onto all query parameters with the given name (there can
--   legitimately be zero or more).
--   
--   In this example, we construct the query URL
--   "<tt>http://httpbin.org/get?foo=bar&amp;foo=quux</tt>".
--   
--   <pre>
--   let opts = <a>defaults</a> <a>&amp;</a> <a>param</a> "foo" <a>.~</a> ["bar", "quux"]
--   <a>getWith</a> opts "http://httpbin.org/get"
--    
--   </pre>
param :: Text -> Lens' Options [Text]

-- | A lens onto the maximum number of redirects that will be followed
--   before an exception is thrown.
--   
--   In this example, a <a>HttpException</a> will be thrown with a
--   <a>TooManyRedirects</a> constructor, because the maximum number of
--   redirects allowed will be exceeded.
--   
--   <pre>
--   let opts = <a>defaults</a> <a>&amp;</a> <a>redirects</a> <a>.~</a> 3
--   <a>getWith</a> opts "http://httpbin.org/redirect/5"
--    
--   </pre>
redirects :: Lens' Options Int

-- | A lens onto all headers (there can legitimately be zero or more).
--   
--   In this example, we print all the headers sent by default with every
--   request.
--   
--   <pre>
--   print (<a>defaults</a> <a>^.</a> <a>headers</a>)
--    
--   </pre>
headers :: Lens' Options [Header]

-- | A lens onto all query parameters.
params :: Lens' Options [(Text, Text)]

-- | A traversal onto the cookie with the given name, if one exists.
--   
--   N.B. This is an "illegal" <a>Traversal'</a>: we can change the
--   <a>cookieName</a> of the associated <a>Cookie</a> so that it differs
--   from the name provided to this function.
cookie :: ByteString -> Traversal' Options Cookie

-- | A lens onto all cookies.
cookies :: Lens' Options Maybe CookieJar

-- | A lens to get the optional status check function
checkResponse :: Lens' Options Maybe ResponseChecker

-- | Supported authentication types.
--   
--   Do not use HTTP authentication unless you are using TLS encryption.
--   These authentication tokens can easily be captured and reused by an
--   attacker if transmitted in the clear.
data Auth
data AWSAuthVersion

-- | AWS request signing version 4
AWSv4 :: AWSAuthVersion

-- | A lens onto request authentication.
--   
--   Example (note the use of TLS):
--   
--   <pre>
--   let opts = <a>defaults</a> <a>&amp;</a> <a>auth</a> <a>?~</a> <a>basicAuth</a> "user" "pass"
--   <a>getWith</a> opts "https://httpbin.org/basic-auth/user/pass"
--    
--   </pre>
auth :: Lens' Options Maybe Auth

-- | Basic authentication. This consists of a plain username and password.
--   
--   Example (note the use of TLS):
--   
--   <pre>
--   let opts = <a>defaults</a> <a>&amp;</a> <a>auth</a> <tt>?~</tt> <a>basicAuth</a> "user" "pass"
--   <a>getWith</a> opts "https://httpbin.org/basic-auth/user/pass"
--    
--   </pre>
--   
--   Note here the use of the <a>?~</a> setter to turn an <a>Auth</a> into
--   a <a>Maybe</a> <a>Auth</a>, to make the type of the RHS compatible
--   with the <a>auth</a> lens.
--   
--   <pre>
--   &gt;&gt;&gt; let opts = defaults &amp; auth ?~ basicAuth "user" "pass"
--   
--   &gt;&gt;&gt; r &lt;- getWith opts "https://httpbin.org/basic-auth/user/pass"
--   
--   &gt;&gt;&gt; r ^? responseBody . key "authenticated"
--   Just (Bool True)
--   </pre>
basicAuth :: ByteString -> ByteString -> Auth

-- | OAuth1 authentication. This consists of a consumer token, a consumer
--   secret, a token and a token secret
oauth1Auth :: ByteString -> ByteString -> ByteString -> ByteString -> Auth

-- | An OAuth2 bearer token. This is treated by many services as the
--   equivalent of a username and password.
--   
--   Example (note the use of TLS):
--   
--   <pre>
--   let opts = <a>defaults</a> <a>&amp;</a> <a>auth</a> <tt>?~</tt> <a>oauth2Bearer</a> "1234abcd"
--   <a>getWith</a> opts "https://public-api.wordpress.com/rest/v1/me/"
--    
--   </pre>
oauth2Bearer :: ByteString -> Auth

-- | 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.
--   
--   Example (note the use of TLS):
--   
--   <pre>
--   let opts = <a>defaults</a> <a>&amp;</a> <a>auth</a> <tt>?~</tt> <a>oauth2Token</a> "abcd1234"
--   <a>getWith</a> opts "https://api.github.com/user"
--    
--   </pre>
oauth2Token :: ByteString -> Auth

-- | AWS v4 request signature.
--   
--   Example (note the use of TLS):
--   
--   <pre>
--   let opts = <a>defaults</a> <a>&amp;</a> <a>auth</a> <tt>?~</tt> 'awsAuth AWSv4' "key" "secret"
--   <a>getWith</a> opts "https://dynamodb.us-west-2.amazonaws.com"
--    
--   </pre>
awsAuth :: AWSAuthVersion -> ByteString -> ByteString -> Auth

-- | Define a HTTP proxy, consisting of a hostname and port number.
data Proxy
Proxy :: ByteString -> Int -> Proxy

-- | A lens onto proxy configuration.
--   
--   Example:
--   
--   <pre>
--   let opts = <a>defaults</a> <a>&amp;</a> <a>proxy</a> <a>?~</a> <a>httpProxy</a> "localhost" 8000
--   <a>getWith</a> opts "http://httpbin.org/get"
--    
--   </pre>
--   
--   Note here the use of the <a>?~</a> setter to turn a <a>Proxy</a> into
--   a <a>Maybe</a> <a>Proxy</a>, to make the type of the RHS compatible
--   with the <a>proxy</a> lens.
proxy :: Lens' Options Maybe Proxy

-- | Proxy configuration.
--   
--   Example:
--   
--   <pre>
--   let opts = <a>defaults</a> <a>&amp;</a> <a>proxy</a> <tt>?~</tt> <a>httpProxy</a> "localhost" 8000
--   <a>getWith</a> opts "http://httpbin.org/get"
--    
--   </pre>
--   
--   Note here the use of the <a>?~</a> setter to turn a <a>Proxy</a> into
--   a <a>Maybe</a> <a>Proxy</a>, to make the type of the RHS compatible
--   with the <a>proxy</a> lens.
httpProxy :: ByteString -> Int -> Proxy
withManager :: () => Options -> IO a -> IO a

-- | A product type for representing more complex payload types.
data Payload
Raw :: ContentType -> RequestBody -> Payload

-- | A key/value pair for an <tt>application/x-www-form-urlencoded</tt>
--   POST request body.
data FormParam
[:=] :: FormParam

-- | A type that can be rendered as the value portion of a key/value pair
--   for use in an <tt>application/x-www-form-urlencoded</tt> POST body.
--   Intended for use with the <a>FormParam</a> type.
--   
--   The instances for <a>String</a>, strict <a>Text</a>, and lazy
--   <a>Text</a> are all encoded using UTF-8 before being URL-encoded.
--   
--   The instance for <a>Maybe</a> gives an empty string on <a>Nothing</a>,
--   and otherwise uses the contained type's instance.
class FormValue a

-- | A single part of a multipart message.
data Part

-- | A lens onto the name of the <tt><a>input</a></tt> element associated
--   with part of a multipart form upload.
partName :: Lens' Part Text

-- | A lens onto the filename associated with part of a multipart form
--   upload.
partFileName :: Lens' Part Maybe String

-- | A lens onto the content-type associated with part of a multipart form
--   upload.
partContentType :: Traversal' Part Maybe MimeType

-- | A lens onto the code that fetches the data associated with part of a
--   multipart form upload.
partGetBody :: Lens' Part IO RequestBody

-- | Make a <a>Part</a> whose content is a strict <a>ByteString</a>.
--   
--   The <a>Part</a> does not have a file name or content type associated
--   with it.
partBS :: Text -> ByteString -> Part

-- | Make a <a>Part</a> whose content is a lazy <a>ByteString</a>.
--   
--   The <a>Part</a> does not have a file name or content type associated
--   with it.
partLBS :: Text -> ByteString -> Part

-- | Make a <tt>Part</tt> whose content is a strict <a>Text</a>, encoded as
--   UTF-8.
--   
--   The <tt>Part</tt> does not have a file name or content type associated
--   with it.
partText :: Text -> Text -> Part

-- | Make a <tt>Part</tt> whose content is a <a>String</a>, encoded as
--   UTF-8.
--   
--   The <tt>Part</tt> does not have a file name or content type associated
--   with it.
partString :: Text -> String -> Part

-- | Make a <a>Part</a> from a file.
--   
--   The entire file will reside in memory at once. If you want constant
--   memory usage, use <a>partFileSource</a>.
--   
--   The <a>FilePath</a> supplied will be used as the file name of the
--   <a>Part</a>. If you do not want to reveal this name to the server, you
--   must remove it prior to uploading.
--   
--   The <a>Part</a> does not have a content type associated with it.
partFile :: Text -> FilePath -> Part

-- | Stream a <a>Part</a> from a file.
--   
--   The <a>FilePath</a> supplied will be used as the file name of the
--   <a>Part</a>. If you do not want to reveal this name to the server, you
--   must remove it prior to uploading.
--   
--   The <a>Part</a> does not have a content type associated with it.
partFileSource :: Text -> FilePath -> Part

-- | A simple representation of the HTTP response.
--   
--   Since 0.1.0
data Response body

-- | A lens onto the body of a response.
--   
--   <pre>
--   r &lt;- <a>get</a> "http://httpbin.org/get"
--   print (r <a>^.</a> <a>responseBody</a>)
--    
--   </pre>
responseBody :: Functor f => body0 -> f body1 -> Response body0 -> f Response body1

-- | A lens onto all matching named headers in an HTTP response.
--   
--   To access exactly one header (the result will be the empty string if
--   there is no match), use the (<a>^.</a>) operator.
--   
--   <pre>
--   r &lt;- <a>get</a> "http://httpbin.org/get"
--   print (r <a>^.</a> <a>responseHeader</a> "Content-Type")
--    
--   </pre>
--   
--   To access at most one header (the result will be <a>Nothing</a> if
--   there is no match), use the (<a>^?</a>) operator.
--   
--   <pre>
--   r &lt;- <a>get</a> "http://httpbin.org/get"
--   print (r <a>^?</a> <a>responseHeader</a> "Content-Transfer-Encoding")
--    
--   </pre>
--   
--   To access all (zero or more) matching headers, use the (<a>^..</a>)
--   operator.
--   
--   <pre>
--   r &lt;- <a>get</a> "http://httpbin.org/get"
--   print (r <a>^..</a> <a>responseHeader</a> "Set-Cookie")
--    
--   </pre>
responseHeader :: () => HeaderName -> Traversal' Response body ByteString

-- | A fold over <tt>Link</tt> headers, matching on both parameter name and
--   value.
--   
--   For example, here is a <tt>Link</tt> header returned by the GitHub
--   search API.
--   
--   <pre>
--   Link:
--     &lt;https://api.github.com/search/code?q=addClass+user%3Amozilla&amp;page=2&gt;; rel="next",
--     &lt;https://api.github.com/search/code?q=addClass+user%3Amozilla&amp;page=34&gt;; rel="last"
--   </pre>
--   
--   And here is an example of how we can retrieve the URL for the
--   <tt>next</tt> link programatically.
--   
--   <pre>
--   r &lt;- <a>get</a> "https://api.github.com/search/code?q=addClass+user:mozilla"
--   print (r <a>^?</a> <a>responseLink</a> "rel" "next" . <a>linkURL</a>)
--    
--   </pre>
responseLink :: () => ByteString -> ByteString -> Fold Response body Link

-- | A fold over any cookies that match the given name.
--   
--   <pre>
--   r &lt;- <a>get</a> "http://www.nytimes.com/"
--   print (r <a>^?</a> responseCookie "RMID")
--    
--   </pre>
responseCookie :: () => ByteString -> Fold Response body Cookie

-- | A lens onto all headers in an HTTP response.
responseHeaders :: Functor f => ResponseHeaders -> f ResponseHeaders -> Response body -> f Response body

-- | A lens onto all cookies set in the response.
responseCookieJar :: Functor f => CookieJar -> f CookieJar -> Response body -> f Response body

-- | A lens onto the status of an HTTP response.
responseStatus :: Functor f => Status -> f Status -> Response body -> f Response body

-- | HTTP Status.
--   
--   Only the <a>statusCode</a> is used for comparisons.
--   
--   Please use <a>mkStatus</a> to create status codes from code and
--   message, or the <a>Enum</a> instance or the status code constants
--   (like <a>ok200</a>). There might be additional record members in the
--   future.
--   
--   Note that the Show instance is only for debugging.
data Status

-- | A lens onto the numeric identifier of an HTTP status.
statusCode :: Lens' Status Int

-- | A lens onto the textual description of an HTTP status.
statusMessage :: Lens' Status ByteString

-- | An element of a <tt>Link</tt> header.
data Link

-- | A lens onto the URL portion of a <tt>Link</tt> element.
linkURL :: Lens' Link ByteString

-- | A lens onto the parameters of a <tt>Link</tt> element.
linkParams :: Lens' Link [(ByteString, ByteString)]

-- | The error type used by <a>asJSON</a> and <a>asValue</a> if a failure
--   occurs when parsing a response body as JSON.
data JSONError
JSONError :: String -> JSONError

-- | Convert the body of an HTTP response from JSON to a suitable Haskell
--   type.
--   
--   In this example, we use <a>asJSON</a> in the <tt>IO</tt> monad, where
--   it will throw a <a>JSONError</a> exception if conversion to the
--   desired type fails.
--   
--   <pre>
--    {-# LANGUAGE DeriveGeneric #-}
--   import <a>GHC.Generics</a> (<a>Generic</a>)
--   
--    {- This Haskell type corresponds to the structure of a
--      response body from httpbin.org. -}
--   
--   data GetBody = GetBody {
--       headers :: <a>Map</a> <a>Text</a> <a>Text</a>
--     , args :: <a>Map</a> <a>Text</a> <a>Text</a>
--     , origin :: <a>Text</a>
--     , url :: <a>Text</a>
--     } deriving (Show, <a>Generic</a>)
--   
--    -- Get GHC to derive a <a>FromJSON</a> instance for us.
--   instance <a>FromJSON</a> GetBody
--   
--    {- The fact that we want a GetBody below will be inferred by our
--      use of the "headers" accessor function. -}
--   
--   foo = do
--     r &lt;- <a>asJSON</a> =&lt;&lt; <a>get</a> "http://httpbin.org/get"
--     print (headers (r <a>^.</a> <tt>responseBody</tt>))
--    
--   </pre>
--   
--   If we use <a>asJSON</a> in the <a>Either</a> monad, it will return
--   <a>Left</a> with a <a>JSONError</a> payload if conversion fails, and
--   <a>Right</a> with a <a>Response</a> whose <tt>responseBody</tt> is the
--   converted value on success.
asJSON :: (MonadThrow m, FromJSON a) => Response ByteString -> m Response a

-- | Convert the body of an HTTP response from JSON to a <tt>Value</tt>.
--   
--   In this example, we use <a>asValue</a> in the <tt>IO</tt> monad, where
--   it will throw a <a>JSONError</a> exception if the conversion to
--   <tt>Value</tt> fails.
--   
--   <pre>
--   foo = do
--     r &lt;- <a>asValue</a> =&lt;&lt; <a>get</a> "http://httpbin.org/get"
--     print (r <a>^?</a> <tt>responseBody</tt> . key "headers" . key "User-Agent")
--    
--   </pre>
asValue :: MonadThrow m => Response ByteString -> m Response Value
data Cookie

-- | A lens onto the name of a cookie.
cookieName :: Lens' Cookie ByteString

-- | A lens onto the value of a cookie.
cookieValue :: Lens' Cookie ByteString

-- | A lens onto the expiry time of a cookie.
cookieExpiryTime :: Lens' Cookie UTCTime

-- | A lens onto the domain of a cookie.
cookieDomain :: Lens' Cookie ByteString

-- | A lens onto the path of a cookie.
cookiePath :: Lens' Cookie ByteString

-- | Turn an attoparsec <a>Parser</a> into a <a>Fold</a>.
--   
--   Both headers and bodies can contain complicated data that we may need
--   to parse.
--   
--   Example: when responding to an OPTIONS request, a server may return
--   the list of verbs it supports in any order, up to and including
--   changing the order on every request (which httpbin.org /actually
--   does/!). To deal with this possibility, we parse the list, then sort
--   it.
--   
--   <pre>
--   &gt;&gt;&gt; import Data.Attoparsec.ByteString.Char8 as A
--   
--   &gt;&gt;&gt; import Data.List (sort)
--   
--   &gt;&gt;&gt; 
--   
--   &gt;&gt;&gt; let comma = skipSpace &gt;&gt; "," &gt;&gt; skipSpace
--   
--   &gt;&gt;&gt; let verbs = A.takeWhile isAlpha_ascii `sepBy` comma
--   
--   &gt;&gt;&gt; 
--   
--   &gt;&gt;&gt; r &lt;- options "http://httpbin.org/get"
--   
--   &gt;&gt;&gt; r ^. responseHeader "Allow" . atto verbs . to sort
--   ["GET","HEAD","OPTIONS"]
--   </pre>
atto :: () => Parser a -> Fold ByteString a

-- | The same as <a>atto</a>, but ensures that the parser consumes the
--   entire input.
--   
--   Equivalent to:
--   
--   <pre>
--   <a>atto_</a> myParser = <a>atto</a> (myParser <a>&lt;*</a> <a>endOfInput</a>)
--    
--   </pre>
atto_ :: () => Parser a -> Fold ByteString a


-- | This module re-exports anything from <tt>Network.Wreq.Types</tt>.
--   
--   see
--   <a>https://hackage.haskell.org/package/wreq/docs/Network-Wreq-Types.html</a>
module Network.Wreq.StringLess.Types
