servant-0.11: A family of combinators for defining webservices APIs

Safe Haskell | None
Language | Haskell2010

Servant.API.HttpVersion

Synopsis

- data HttpVersion :: * = HttpVersion {
  - httpMajor :: ~Int
  - httpMinor :: ~Int
  }

# Documentation

| You can directly use the `HttpVersion` type from `Network.HTTP.Types` if your request handlers need it to compute a response. This would make the request handlers take an argument of type `HttpVersion`.

Example:

    >>> type API = HttpVersion :> Get '[JSON] String

data HttpVersion :: * #

HTTP Version.

Note that the Show instance is intended merely for debugging.

Constructors

HttpVersion |

Fields

- httpMajor :: ~Int
- httpMinor :: ~Int

Instances

Eq HttpVersion |
Methods (==) :: HttpVersion -> HttpVersion -> Bool # (/=) :: HttpVersion -> HttpVersion -> Bool #
Ord HttpVersion |
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 #
Show HttpVersion |
Methods showsPrec :: Int -> HttpVersion -> ShowS # show :: HttpVersion -> String # showList :: [HttpVersion] -> ShowS #