Module

Nodetrout.Internal.Content

Package
purescript-nodetrout
Repository
nsaunders/purescript-nodetrout

This module contains types and logic related to content negotiation.

#negotiate Source

negotiate :: forall m content. Monad m => Request -> NonEmptyList (Tuple MediaType content) -> ExceptT HTTPError m (Tuple MediaType content)

Attempts to return the available content that best matches the client's Accept header.