http-interchange-0.3.2.1: Types and serialization for HTTP
Safe HaskellSafe-Inferred
LanguageGHC2021

Http.Types

Synopsis

Request

data Request Source #

The request line and the request headers.

Constructors

Request 

Instances

Instances details
Show Request Source # 
Instance details

Defined in Http.Request

Eq Request Source # 
Instance details

Defined in Http.Request

Methods

(==) :: Request -> Request -> Bool #

(/=) :: Request -> Request -> Bool #

data RequestLine Source #

An HTTP request line

Constructors

RequestLine 

Fields

Instances

Instances details
Show RequestLine Source # 
Instance details

Defined in Http.Request

Eq RequestLine Source # 
Instance details

Defined in Http.Request

Response

data Response Source #

The response status line and the response headers.

Constructors

Response 

Instances

Instances details
Show Response Source # 
Instance details

Defined in Http.Response

Eq Response Source # 
Instance details

Defined in Http.Response

data StatusLine Source #

Constructors

StatusLine 

Instances

Instances details
Show StatusLine Source # 
Instance details

Defined in Http.Response

Eq StatusLine Source # 
Instance details

Defined in Http.Response

Header

data Headers Source #

Collection of HTTP headers. Supports case-insensitive lookup. This is intended to be used for small collections of headers. Expect degraded performance if this is used for collections of more than 128 headers.

This preserves the original order of the headers and the original case of the header names.

Instances

Instances details
Monoid Headers Source # 
Instance details

Defined in Http.Headers

Semigroup Headers Source # 
Instance details

Defined in Http.Headers

Show Headers Source # 
Instance details

Defined in Http.Headers

Eq Headers Source # 
Instance details

Defined in Http.Headers

Methods

(==) :: Headers -> Headers -> Bool #

(/=) :: Headers -> Headers -> Bool #

data Header Source #

An HTTP header. This type does not enforce a restricted character set. If, for example, the user creates a header whose key has a colon character, the resulting request will be malformed.

Constructors

Header 

Fields

Instances

Instances details
Show Header Source # 
Instance details

Defined in Http.Header

Eq Header Source # 
Instance details

Defined in Http.Header

Methods

(==) :: Header -> Header -> Bool #

(/=) :: Header -> Header -> Bool #

data LookupException Source #

Many headers cannot appear more than once. This is part of the return type for lookup, and it helps us track whether the lookup failure was the result of something that might be expected (the header was Missing) or something that is definitely a mistake (the header was duplicated).

Constructors

Duplicate 
Missing 

Instances

Instances details
Show LookupException Source # 
Instance details

Defined in Http.Headers

Eq LookupException Source # 
Instance details

Defined in Http.Headers

Bodied

data Bodied a Source #

An HTTP request or response with a body.

Constructors

Bodied 

Fields

Instances

Instances details
Show a => Show (Bodied a) Source # 
Instance details

Defined in Http.Bodied

Methods

showsPrec :: Int -> Bodied a -> ShowS #

show :: Bodied a -> String #

showList :: [Bodied a] -> ShowS #

Eq a => Eq (Bodied a) Source # 
Instance details

Defined in Http.Bodied

Methods

(==) :: Bodied a -> Bodied a -> Bool #

(/=) :: Bodied a -> Bodied a -> Bool #