Module

Erl.Cowboy.Handlers.Rest

#InitResult

data InitResult t0

#initResult

initResult :: forall a. a -> Req -> InitResult a

#InitHandler

#RestResult

data RestResult t0 t1

RestResult r s is the result of a rest callback with result r and state s

#restResult

restResult :: forall r s. r -> s -> Req -> RestResult r s

#stop

stop :: forall r s. s -> Req -> RestResult r s

#switchHandler

switchHandler :: forall r s. NativeModuleName -> s -> Req -> RestResult r s

#RestHandler

type RestHandler r s = EffectFn2 Req s (RestResult r s)

#AllowedMethodsHandler

type AllowedMethodsHandler s = RestHandler (List String) s

Handler for allowed_methods callback

#AllowedMissingPostHandler

type AllowedMissingPostHandler s = RestHandler Boolean s

Handler for allow_missing_post callback

#CharsetsProvidedHandler

type CharsetsProvidedHandler s = RestHandler (List String) s

Handler for charsets_provided callback

#ContentTypesAcceptedResult

#AcceptCallback

#ContentTypesAcceptedHandler

type ContentTypesAcceptedHandler s = RestHandler ContentTypesAcceptedResult s

Handler for content_types_accepted callback

#ContentTypesProvidedResult

#ProvideCallback

#ContentTypesProvidedHandler

type ContentTypesProvidedHandler s = RestHandler ContentTypesProvidedResult s

Handler for content_types_provided callback

#DeleteCompletedHandler

type DeleteCompletedHandler s = RestHandler Boolean s

Handler for delete_completed callback

#DeleteResourceHandler

type DeleteResourceHandler s = RestHandler Boolean s

Handler for delete_resource callback

#ForbiddenHandler

type ForbiddenHandler s = RestHandler Boolean s

Handler for expires callback Handler for forbidden callback

#ETag

data ETag

Strong or weak etag

Constructors

#GenerateEtagHandler

type GenerateEtagHandler s = RestHandler ETag s

Handler for generate_etag callback

#IsAuthorizedResponse

#IsAuthorizedHandler

type IsAuthorizedHandler s = RestHandler IsAuthorizedResponse s

Handler for is_authorized callback

#IsConflictHandler

type IsConflictHandler s = RestHandler Boolean s

Handler for _ callback

#KnownMethodsHandler

type KnownMethodsHandler s = RestHandler (List String) s

Handler for _ callback

#LanguagesProvidedHandler

type LanguagesProvidedHandler s = RestHandler (List String) s

Handler for _ callback

#MalformedRequestHandler

type MalformedRequestHandler s = RestHandler Boolean s

Handler for _ callback Handler for _ callback

#MovedResult

#MovedPermanentlyHandler

type MovedPermanentlyHandler s = RestHandler MovedResult s

Handler for moved_permanently callback

#MovedTemporarilyHandler

type MovedTemporarilyHandler s = RestHandler MovedResult s

Handler for moved_temporarily callback

#MultipleChoicesHandler

type MultipleChoicesHandler s = RestHandler Boolean s

Handler for multiple_choices callback

#OptionsResponse

#OptionsHandler

type OptionsHandler s = RestHandler OptionsResponse s

Handler for options callback

#PreviouslyExistedHandler

type PreviouslyExistedHandler s = RestHandler Boolean s

Handler for previously_existed callback

#ResourceExistsHandler

type ResourceExistsHandler s = RestHandler Boolean s

Handler for resource_exists callback

#ServiceAvailableHandler

type ServiceAvailableHandler s = RestHandler Boolean s

Handler for service_available callback

#UriTooLongHandler

type UriTooLongHandler s = RestHandler Boolean s

Handler for uri_too_long callback

#ValidContentHeadersHandler

type ValidContentHeadersHandler s = RestHandler Boolean s

Handler for valid_content_headers callback

#ValidEntityLengthHandler

type ValidEntityLengthHandler s = RestHandler Boolean s

Handler for valid_entity_length callback

#VariancesHandler

type VariancesHandler s = RestHandler (List String) s

Handler for variances callback

#CowboyRestBehaviour

type CowboyRestBehaviour = Behaviour "cowboy_rest"

#cowboyRestBehaviour

cowboyRestBehaviour :: forall a s. { init :: InitHandler a s } -> CowboyRestBehaviour

A cowboy_rest behaviour. Note that while may callbacks are defined only init is mandatory

Modules