Module

HTTPurple.Response

Package
purescript-httpurple
Repository
sigma-andex/purescript-httpurple

#Response Source

type Response = { headers :: ResponseHeaders, status :: Status, writeBody :: ServerResponse -> Aff Unit }

A Response is a status code, headers, and a body.

#ResponseM Source

type ResponseM = Aff Response

The ResponseM type simply conveniently wraps up an HTTPurple monad that returns a response. This type is the return type of all router/route methods.

#send Source

send :: forall m. MonadEffect m => MonadAff m => ServerResponse -> Response -> m Unit

Given an HTTP Response and a HTTPurple Response, this method will return a monad encapsulating writing the HTTPurple Response to the HTTP Response and closing the HTTP Response.

#response Source

response :: forall m b. MonadAff m => Body b => Status -> b -> m Response

For custom response statuses or providing a body for response codes that don't typically send one.

#response' Source

response' :: forall m b. MonadAff m => Body b => Status -> ResponseHeaders -> b -> m Response

The same as response but with headers.

#emptyResponse Source

emptyResponse :: forall m. MonadAff m => Status -> m Response

The same as response but without a body.

#emptyResponse' Source

emptyResponse' :: forall m. MonadAff m => Status -> ResponseHeaders -> m Response

The same as emptyResponse but with headers.

#continue Source

continue :: forall m. MonadAff m => m Response

100

#continue' Source

continue' :: forall m. MonadAff m => ResponseHeaders -> m Response

100 with headers

#switchingProtocols Source

switchingProtocols :: forall m. MonadAff m => m Response

101

#switchingProtocols' Source

switchingProtocols' :: forall m. MonadAff m => ResponseHeaders -> m Response

101 with headers

#processing Source

processing :: forall m. MonadAff m => m Response

102

#processing' Source

processing' :: forall m. MonadAff m => ResponseHeaders -> m Response

102 with headers

#ok Source

ok :: forall m b. MonadAff m => Body b => b -> m Response

200

#ok' Source

ok' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

200 with headers

#created Source

created :: forall m. MonadAff m => m Response

201

#created' Source

created' :: forall m. MonadAff m => ResponseHeaders -> m Response

201 with headers

#accepted Source

accepted :: forall m. MonadAff m => m Response

202

#accepted' Source

accepted' :: forall m. MonadAff m => ResponseHeaders -> m Response

202 with headers

#nonAuthoritativeInformation Source

nonAuthoritativeInformation :: forall m b. MonadAff m => Body b => b -> m Response

203

#nonAuthoritativeInformation' Source

nonAuthoritativeInformation' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

203 with headers

#noContent Source

noContent :: forall m. MonadAff m => m Response

204

#noContent' Source

noContent' :: forall m. MonadAff m => ResponseHeaders -> m Response

204 with headers

#resetContent Source

resetContent :: forall m. MonadAff m => m Response

205

#resetContent' Source

resetContent' :: forall m. MonadAff m => ResponseHeaders -> m Response

205 with headers

#partialContent Source

partialContent :: forall m b. MonadAff m => Body b => b -> m Response

206

#partialContent' Source

partialContent' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

206 with headers

#multiStatus Source

multiStatus :: forall m b. MonadAff m => Body b => b -> m Response

207

#multiStatus' Source

multiStatus' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

207 with headers

#alreadyReported Source

alreadyReported :: forall m. MonadAff m => m Response

208

#alreadyReported' Source

alreadyReported' :: forall m. MonadAff m => ResponseHeaders -> m Response

208 with headers

#iMUsed Source

iMUsed :: forall m b. MonadAff m => Body b => b -> m Response

226

#iMUsed' Source

iMUsed' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

226 with headers

#multipleChoices Source

multipleChoices :: forall m b. MonadAff m => Body b => b -> m Response

300

#multipleChoices' Source

multipleChoices' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

300 with headers

#movedPermanently Source

movedPermanently :: forall m b. MonadAff m => Body b => b -> m Response

301

#movedPermanently' Source

movedPermanently' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

301 with headers

#found Source

found :: forall m b. MonadAff m => Body b => b -> m Response

302

#found' Source

found' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

302 with headers

#seeOther Source

seeOther :: forall m b. MonadAff m => Body b => b -> m Response

303

#seeOther' Source

seeOther' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

303 with headers

#notModified Source

notModified :: forall m. MonadAff m => m Response

304

#notModified' Source

notModified' :: forall m. MonadAff m => ResponseHeaders -> m Response

304 with headers

#useProxy Source

useProxy :: forall m b. MonadAff m => Body b => b -> m Response

305

#useProxy' Source

useProxy' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

305 with headers

#temporaryRedirect Source

temporaryRedirect :: forall m b. MonadAff m => Body b => b -> m Response

307

#temporaryRedirect' Source

temporaryRedirect' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

307 with headers

#permanentRedirect Source

permanentRedirect :: forall m b. MonadAff m => Body b => b -> m Response

308

#permanentRedirect' Source

permanentRedirect' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

308 with headers

#badRequest Source

badRequest :: forall m b. MonadAff m => Body b => b -> m Response

400

#badRequest' Source

badRequest' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

400 with headers

#unauthorized Source

unauthorized :: forall m. MonadAff m => m Response

401

#unauthorized' Source

unauthorized' :: forall m. MonadAff m => ResponseHeaders -> m Response

401 with headers

#paymentRequired Source

paymentRequired :: forall m. MonadAff m => m Response

402

#paymentRequired' Source

paymentRequired' :: forall m. MonadAff m => ResponseHeaders -> m Response

402 with headers

#forbidden Source

forbidden :: forall m. MonadAff m => m Response

403

#forbidden' Source

forbidden' :: forall m. MonadAff m => ResponseHeaders -> m Response

403 with headers

#notFound Source

notFound :: forall m. MonadAff m => m Response

404

#notFound' Source

notFound' :: forall m. MonadAff m => ResponseHeaders -> m Response

404 with headers

#methodNotAllowed Source

methodNotAllowed :: forall m. MonadAff m => m Response

405

#methodNotAllowed' Source

methodNotAllowed' :: forall m. MonadAff m => ResponseHeaders -> m Response

405 with headers

#notAcceptable Source

notAcceptable :: forall m. MonadAff m => m Response

406

#notAcceptable' Source

notAcceptable' :: forall m. MonadAff m => ResponseHeaders -> m Response

406 with headers

#proxyAuthenticationRequired Source

#proxyAuthenticationRequired' Source

proxyAuthenticationRequired' :: forall m. MonadAff m => ResponseHeaders -> m Response

407 with headers

#requestTimeout Source

requestTimeout :: forall m. MonadAff m => m Response

408

#requestTimeout' Source

requestTimeout' :: forall m. MonadAff m => ResponseHeaders -> m Response

408 with headers

#conflict Source

conflict :: forall m b. MonadAff m => Body b => b -> m Response

409

#conflict' Source

conflict' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

409 with headers

#gone Source

gone :: forall m. MonadAff m => m Response

410

#gone' Source

gone' :: forall m. MonadAff m => ResponseHeaders -> m Response

410 with headers

#lengthRequired Source

lengthRequired :: forall m. MonadAff m => m Response

411

#lengthRequired' Source

lengthRequired' :: forall m. MonadAff m => ResponseHeaders -> m Response

411 with headers

#preconditionFailed Source

preconditionFailed :: forall m. MonadAff m => m Response

412

#preconditionFailed' Source

preconditionFailed' :: forall m. MonadAff m => ResponseHeaders -> m Response

412 with headers

#payloadTooLarge Source

payloadTooLarge :: forall m. MonadAff m => m Response

413

#payloadTooLarge' Source

payloadTooLarge' :: forall m. MonadAff m => ResponseHeaders -> m Response

413 with headers

#uRITooLong Source

uRITooLong :: forall m. MonadAff m => m Response

414

#uRITooLong' Source

uRITooLong' :: forall m. MonadAff m => ResponseHeaders -> m Response

414 with headers

#unsupportedMediaType Source

unsupportedMediaType :: forall m. MonadAff m => m Response

415

#unsupportedMediaType' Source

unsupportedMediaType' :: forall m. MonadAff m => ResponseHeaders -> m Response

415 with headers

#rangeNotSatisfiable Source

rangeNotSatisfiable :: forall m. MonadAff m => m Response

416

#rangeNotSatisfiable' Source

rangeNotSatisfiable' :: forall m. MonadAff m => ResponseHeaders -> m Response

416 with headers

#expectationFailed Source

expectationFailed :: forall m. MonadAff m => m Response

417

#expectationFailed' Source

expectationFailed' :: forall m. MonadAff m => ResponseHeaders -> m Response

417 with headers

#imATeapot Source

imATeapot :: forall m. MonadAff m => m Response

418

#imATeapot' Source

imATeapot' :: forall m. MonadAff m => ResponseHeaders -> m Response

418 with headers

#misdirectedRequest Source

misdirectedRequest :: forall m. MonadAff m => m Response

421

#misdirectedRequest' Source

misdirectedRequest' :: forall m. MonadAff m => ResponseHeaders -> m Response

421 with headers

#unprocessableEntity Source

unprocessableEntity :: forall m. MonadAff m => m Response

422

#unprocessableEntity' Source

unprocessableEntity' :: forall m. MonadAff m => ResponseHeaders -> m Response

422 with headers

#locked Source

locked :: forall m. MonadAff m => m Response

423

#locked' Source

locked' :: forall m. MonadAff m => ResponseHeaders -> m Response

423 with headers

#failedDependency Source

failedDependency :: forall m. MonadAff m => m Response

424

#failedDependency' Source

failedDependency' :: forall m. MonadAff m => ResponseHeaders -> m Response

424 with headers

#upgradeRequired Source

upgradeRequired :: forall m. MonadAff m => m Response

426

#upgradeRequired' Source

upgradeRequired' :: forall m. MonadAff m => ResponseHeaders -> m Response

426 with headers

#preconditionRequired Source

preconditionRequired :: forall m. MonadAff m => m Response

428

#preconditionRequired' Source

preconditionRequired' :: forall m. MonadAff m => ResponseHeaders -> m Response

428 with headers

#tooManyRequests Source

tooManyRequests :: forall m. MonadAff m => m Response

429

#tooManyRequests' Source

tooManyRequests' :: forall m. MonadAff m => ResponseHeaders -> m Response

429 with headers

#requestHeaderFieldsTooLarge Source

#requestHeaderFieldsTooLarge' Source

requestHeaderFieldsTooLarge' :: forall m. MonadAff m => ResponseHeaders -> m Response

431 with headers

#unavailableForLegalReasons Source

#unavailableForLegalReasons' Source

unavailableForLegalReasons' :: forall m. MonadAff m => ResponseHeaders -> m Response

451 with headers

#internalServerError Source

internalServerError :: forall m b. MonadAff m => Body b => b -> m Response

500

#internalServerError' Source

internalServerError' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response

500 with headers

#notImplemented Source

notImplemented :: forall m. MonadAff m => m Response

501

#notImplemented' Source

notImplemented' :: forall m. MonadAff m => ResponseHeaders -> m Response

501 with headers

#badGateway Source

badGateway :: forall m. MonadAff m => m Response

502

#badGateway' Source

badGateway' :: forall m. MonadAff m => ResponseHeaders -> m Response

502 with headers

#serviceUnavailable Source

serviceUnavailable :: forall m. MonadAff m => m Response

503

#serviceUnavailable' Source

serviceUnavailable' :: forall m. MonadAff m => ResponseHeaders -> m Response

503 with headers

#gatewayTimeout Source

gatewayTimeout :: forall m. MonadAff m => m Response

504

#gatewayTimeout' Source

gatewayTimeout' :: forall m. MonadAff m => ResponseHeaders -> m Response

504 with headers

#hTTPVersionNotSupported Source

hTTPVersionNotSupported :: forall m. MonadAff m => m Response

505

#hTTPVersionNotSupported' Source

hTTPVersionNotSupported' :: forall m. MonadAff m => ResponseHeaders -> m Response

505 with headers

#variantAlsoNegotiates Source

variantAlsoNegotiates :: forall m. MonadAff m => m Response

506

#variantAlsoNegotiates' Source

variantAlsoNegotiates' :: forall m. MonadAff m => ResponseHeaders -> m Response

506 with headers

#insufficientStorage Source

insufficientStorage :: forall m. MonadAff m => m Response

507

#insufficientStorage' Source

insufficientStorage' :: forall m. MonadAff m => ResponseHeaders -> m Response

507 with headers

#loopDetected Source

loopDetected :: forall m. MonadAff m => m Response

508

#loopDetected' Source

loopDetected' :: forall m. MonadAff m => ResponseHeaders -> m Response

508 with headers

#notExtended Source

notExtended :: forall m. MonadAff m => m Response

510

#notExtended' Source

notExtended' :: forall m. MonadAff m => ResponseHeaders -> m Response

510 with headers

#networkAuthenticationRequired Source

#networkAuthenticationRequired' Source

networkAuthenticationRequired' :: forall m. MonadAff m => ResponseHeaders -> m Response

511 with headers