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

Safe Haskell | Safe
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 Source #

HTTP Version.

Note that the Show instance is intended merely for debugging.

Constructors

HttpVersion |

Fields

- httpMajor :: !Int
- httpMinor :: !Int

Instances

Eq HttpVersion |
Instance details Defined in Network.HTTP.Types.Version Methods (==) :: HttpVersion -> HttpVersion -> Bool Source # (/=) :: HttpVersion -> HttpVersion -> Bool Source #
Ord HttpVersion |

Instance details

Defined in Network.HTTP.Types.Version

Methods

compare :: HttpVersion -> HttpVersion -> Ordering Source #

(<) :: HttpVersion -> HttpVersion -> Bool Source #

(<=) :: HttpVersion -> HttpVersion -> Bool Source #

(>) :: HttpVersion -> HttpVersion -> Bool Source #

(>=) :: HttpVersion -> HttpVersion -> Bool Source #

max :: HttpVersion -> HttpVersion -> HttpVersion Source #

min :: HttpVersion -> HttpVersion -> HttpVersion Source #

Show HttpVersion |
Instance details Defined in Network.HTTP.Types.Version Methods showsPrec :: Int -> HttpVersion -> ShowS Source # show :: HttpVersion -> String Source # showList :: [HttpVersion] -> ShowS Source #
HasLink sub => HasLink (HttpVersion :> sub :: Type) Source # |
Instance details Defined in Servant.Links Associated Types type MkLink (HttpVersion :> sub) a :: Type Source # Methods toLink :: (Link -> a) -> Proxy (HttpVersion :> sub) -> Link -> MkLink (HttpVersion :> sub) a Source #
type MkLink (HttpVersion :> sub :: Type) a Source # |
Instance details Defined in Servant.Links type MkLink (HttpVersion :> sub :: Type) a = MkLink sub a