Servant.Server.UVerb

servant-server-0.20.2: A family of combinators for defining webservices APIs and serving them

Safe Haskell | None
Language | Haskell2010

Servant.Server.UVerb

Contents

- Orphan instances

Synopsis

- respond :: forall x (xs :: [Type]) f. (Applicative f, HasStatus x, IsMember x xs) => x -> f (Union xs)
- class IsServerResource (cts :: [Type]) a

# Documentation

respond :: forall x (xs :: [Type]) f. (Applicative f, HasStatus x, IsMember x xs) => x -> f (Union xs) #

`return` for `UVerb` handlers. Takes a value of any of the members of the open union, and will construct a union value in an `Applicative` (eg. `Server`).

class IsServerResource (cts :: [Type]) a #

Minimal complete definition

resourceResponse, resourceHeaders

#### Instances

Instances details

AllCTRender cts a => IsServerResource cts a # |
Instance details Defined in Servant.Server.UVerb Methods resourceResponse :: Request -> Proxy cts -> a -> Maybe (ByteString, ByteString) resourceHeaders :: Proxy cts -> a -> [(HeaderName, ByteString)]
(IsServerResource cts a, GetHeaders (Headers h a)) => IsServerResource cts (Headers h a) # |
Instance details Defined in Servant.Server.UVerb Methods resourceResponse :: Request -> Proxy cts -> Headers h a -> Maybe (ByteString, ByteString) resourceHeaders :: Proxy cts -> Headers h a -> [(HeaderName, ByteString)]
IsServerResource cts a => IsServerResource cts (WithStatus n a) # |
Instance details Defined in Servant.Server.UVerb Methods resourceResponse :: Request -> Proxy cts -> WithStatus n a -> Maybe (ByteString, ByteString) resourceHeaders :: Proxy cts -> WithStatus n a -> [(HeaderName, ByteString)]

# Orphan instances

(ReflectMethod method, AllMime contentTypes, All (IsServerResourceWithStatus contentTypes) as, Unique (Statuses as)) => HasServer (UVerb method contentTypes as :: Type) context # |
Instance details Methods route :: Proxy (UVerb method contentTypes as) -> Context context -> Delayed env (Server (UVerb method contentTypes as)) -> Router env # hoistServerWithContext :: Proxy (UVerb method contentTypes as) -> Proxy context -> (forall x. m x -> n x) -> ServerT (UVerb method contentTypes as) m -> ServerT (UVerb method contentTypes as) n #