bilge-0.22.0: Library for composing HTTP requests.
Safe HaskellSafe-Inferred
LanguageGHC2021

Bilge.Response

Synopsis

Helpers

getHeader' :: HeaderName -> Response a -> ByteString Source #

Like getHeader, but if no value exists for the given key, return the static ByteString "NO_HEADER_VALUE".

getCookieValue :: ByteString -> Response a -> Maybe ByteString Source #

Retrieve the value of a given cookie name from a "Set-Cookie" header on the response

Re-exports

data Response body Source #

A simple representation of the HTTP response.

Since 0.1.0

Instances

Instances details
Foldable Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

fold :: Monoid m => Response m -> m #

foldMap :: Monoid m => (a -> m) -> Response a -> m #

foldMap' :: Monoid m => (a -> m) -> Response a -> m #

foldr :: (a -> b -> b) -> b -> Response a -> b #

foldr' :: (a -> b -> b) -> b -> Response a -> b #

foldl :: (b -> a -> b) -> b -> Response a -> b #

foldl' :: (b -> a -> b) -> b -> Response a -> b #

foldr1 :: (a -> a -> a) -> Response a -> a #

foldl1 :: (a -> a -> a) -> Response a -> a #

toList :: Response a -> [a] #

null :: Response a -> Bool #

length :: Response a -> Int #

elem :: Eq a => a -> Response a -> Bool #

maximum :: Ord a => Response a -> a #

minimum :: Ord a => Response a -> a #

sum :: Num a => Response a -> a #

product :: Num a => Response a -> a #

Traversable Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

traverse :: Applicative f => (a -> f b) -> Response a -> f (Response b) #

sequenceA :: Applicative f => Response (f a) -> f (Response a) #

mapM :: Monad m => (a -> m b) -> Response a -> m (Response b) #

sequence :: Monad m => Response (m a) -> m (Response a) #

Functor Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

fmap :: (a -> b) -> Response a -> Response b #

(<$) :: a -> Response b -> Response a #

Show body => Show (Response body) 
Instance details

Defined in Network.HTTP.Client.Types

Methods

showsPrec :: Int -> Response body -> ShowS #

show :: Response body -> String #

showList :: [Response body] -> ShowS #

responseStatus :: Response body -> Status Source #

Status code of the response.

Since 0.1.0

responseHeaders :: Response body -> ResponseHeaders Source #

Response headers sent by the server.

Since 0.1.0

responseVersion :: Response body -> HttpVersion Source #

HTTP version used by the server.

Since 0.1.0

responseBody :: Response body -> body Source #

Response body sent by the server.

Since 0.1.0