| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Network.HTTP.Types.Version
Description
Types and constants to describe the HTTP version.
There are no parsing functions, as the formats are fairly different per version of HTTP. And seeing as there are only a handful of versions, it is easier to manually parse the version ad hoc.
For example, when you are expecting HTTP v1, try to match HTTP/1.1 or
HTTP/1.0. If you're expecting HTTP v2 or v3, you'd be using ALPN tokens,
which would be http/1.1, h2 or h3.
Synopsis
- data HttpVersion where
- HttpVersion { }
- pattern Http09 :: HttpVersion
- pattern Http10 :: HttpVersion
- pattern Http11 :: HttpVersion
- pattern Http20 :: HttpVersion
- pattern Http30 :: HttpVersion
- http09 :: HttpVersion
- http10 :: HttpVersion
- http11 :: HttpVersion
- http20 :: HttpVersion
- http30 :: HttpVersion
Documentation
data HttpVersion Source #
HTTP Version.
Note that the Show instance is intended merely for debugging.
Constructors
| HttpVersion | |
Bundled Patterns
| pattern Http09 :: HttpVersion | Since: 0.13.0 |
| pattern Http10 :: HttpVersion | Since: 0.13.0 |
| pattern Http11 :: HttpVersion | Since: 0.13.0 |
| pattern Http20 :: HttpVersion | Since: 0.13.0 |
| pattern Http30 :: HttpVersion | Since: 0.13.0 |
Instances
| Data HttpVersion Source # | Since: 0.12.4 | ||||
Defined in Network.HTTP.Types.Version Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HttpVersion -> c HttpVersion # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HttpVersion # toConstr :: HttpVersion -> Constr # dataTypeOf :: HttpVersion -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HttpVersion) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HttpVersion) # gmapT :: (forall b. Data b => b -> b) -> HttpVersion -> HttpVersion # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HttpVersion -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HttpVersion -> r # gmapQ :: (forall d. Data d => d -> u) -> HttpVersion -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HttpVersion -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HttpVersion -> m HttpVersion # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HttpVersion -> m HttpVersion # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HttpVersion -> m HttpVersion # | |||||
| Generic HttpVersion Source # | |||||
Defined in Network.HTTP.Types.Version Associated Types
| |||||
| Show HttpVersion Source # |
This should not be used to render the HTTP version, as different versions
have different ways of rendering (i.e. HTTP v2 uses | ||||
Defined in Network.HTTP.Types.Version Methods showsPrec :: Int -> HttpVersion -> ShowS # show :: HttpVersion -> String # showList :: [HttpVersion] -> ShowS # | |||||
| Eq HttpVersion Source # | |||||
Defined in Network.HTTP.Types.Version | |||||
| Ord HttpVersion Source # | |||||
Defined in Network.HTTP.Types.Version Methods compare :: HttpVersion -> HttpVersion -> Ordering # (<) :: HttpVersion -> HttpVersion -> Bool # (<=) :: HttpVersion -> HttpVersion -> Bool # (>) :: HttpVersion -> HttpVersion -> Bool # (>=) :: HttpVersion -> HttpVersion -> Bool # max :: HttpVersion -> HttpVersion -> HttpVersion # min :: HttpVersion -> HttpVersion -> HttpVersion # | |||||
| type Rep HttpVersion Source # | Since: 0.12.4 | ||||
Defined in Network.HTTP.Types.Version type Rep HttpVersion = D1 ('MetaData "HttpVersion" "Network.HTTP.Types.Version" "http-types-0.13.0-inplace" 'False) (C1 ('MetaCons "HttpVersion" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpMajor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "httpMinor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))) | |||||
http09 :: HttpVersion Source #
HTTP 0.9
http10 :: HttpVersion Source #
HTTP 1.0
http11 :: HttpVersion Source #
HTTP 1.1
http20 :: HttpVersion Source #
HTTP 2.0
Since: 0.10
http30 :: HttpVersion Source #
HTTP 3.0
Since: 0.12.5