Module

HTTPure.Response

Package
purescript-httpure
Repository
cprussin/purescript-httpure

#Response Source

type Response = { body :: Body, headers :: Headers, status :: Status }

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

#ResponseM Source

type ResponseM e = Aff (HTTPureEffects e) Response

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

#send Source

send :: forall e. Response -> Response -> Eff (HTTPureEffects e) Unit

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

#response Source

response :: forall e. Status -> Body -> ResponseM e

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

#response' Source

response' :: forall e. Status -> Headers -> Body -> ResponseM e

The same as response but with headers.

#emptyResponse Source

emptyResponse :: forall e. Status -> ResponseM e

The same as response but without a body.

#emptyResponse' Source

emptyResponse' :: forall e. Status -> Headers -> ResponseM e

The same as emptyResponse but with headers.

#continue Source

continue :: forall e. ResponseM e

100

#continue' Source

continue' :: forall e. Headers -> ResponseM e

100 with headers

#switchingProtocols Source

switchingProtocols :: forall e. ResponseM e

101

#switchingProtocols' Source

switchingProtocols' :: forall e. Headers -> ResponseM e

101 with headers

#processing Source

processing :: forall e. ResponseM e

102

#processing' Source

processing' :: forall e. Headers -> ResponseM e

102 with headers

#ok Source

ok :: forall e. Body -> ResponseM e

200

#ok' Source

ok' :: forall e. Headers -> Body -> ResponseM e

200 with headers

#created Source

created :: forall e. ResponseM e

201

#created' Source

created' :: forall e. Headers -> ResponseM e

201 with headers

#accepted Source

accepted :: forall e. ResponseM e

202

#accepted' Source

accepted' :: forall e. Headers -> ResponseM e

202 with headers

#nonAuthoritativeInformation Source

#nonAuthoritativeInformation' Source

nonAuthoritativeInformation' :: forall e. Headers -> Body -> ResponseM e

203 with headers

#noContent Source

noContent :: forall e. ResponseM e

204

#noContent' Source

noContent' :: forall e. Headers -> ResponseM e

204 with headers

#resetContent Source

resetContent :: forall e. ResponseM e

205

#resetContent' Source

resetContent' :: forall e. Headers -> ResponseM e

205 with headers

#partialContent Source

partialContent :: forall e. Body -> ResponseM e

206

#partialContent' Source

partialContent' :: forall e. Headers -> Body -> ResponseM e

206 with headers

#multiStatus Source

multiStatus :: forall e. Body -> ResponseM e

207

#multiStatus' Source

multiStatus' :: forall e. Headers -> Body -> ResponseM e

207 with headers

#alreadyReported Source

alreadyReported :: forall e. ResponseM e

208

#alreadyReported' Source

alreadyReported' :: forall e. Headers -> ResponseM e

208 with headers

#iMUsed Source

iMUsed :: forall e. Body -> ResponseM e

226

#iMUsed' Source

iMUsed' :: forall e. Headers -> Body -> ResponseM e

226 with headers

#multipleChoices Source

multipleChoices :: forall e. Body -> ResponseM e

300

#multipleChoices' Source

multipleChoices' :: forall e. Headers -> Body -> ResponseM e

300 with headers

#movedPermanently Source

movedPermanently :: forall e. Body -> ResponseM e

301

#movedPermanently' Source

movedPermanently' :: forall e. Headers -> Body -> ResponseM e

301 with headers

#found Source

found :: forall e. Body -> ResponseM e

302

#found' Source

found' :: forall e. Headers -> Body -> ResponseM e

302 with headers

#seeOther Source

seeOther :: forall e. Body -> ResponseM e

303

#seeOther' Source

seeOther' :: forall e. Headers -> Body -> ResponseM e

303 with headers

#notModified Source

notModified :: forall e. ResponseM e

304

#notModified' Source

notModified' :: forall e. Headers -> ResponseM e

304 with headers

#useProxy Source

useProxy :: forall e. Body -> ResponseM e

305

#useProxy' Source

useProxy' :: forall e. Headers -> Body -> ResponseM e

305 with headers

#temporaryRedirect Source

temporaryRedirect :: forall e. Body -> ResponseM e

307

#temporaryRedirect' Source

temporaryRedirect' :: forall e. Headers -> Body -> ResponseM e

307 with headers

#permanentRedirect Source

permanentRedirect :: forall e. Body -> ResponseM e

308

#permanentRedirect' Source

permanentRedirect' :: forall e. Headers -> Body -> ResponseM e

308 with headers

#badRequest Source

badRequest :: forall e. Body -> ResponseM e

400

#badRequest' Source

badRequest' :: forall e. Headers -> Body -> ResponseM e

400 with headers

#unauthorized Source

unauthorized :: forall e. ResponseM e

401

#unauthorized' Source

unauthorized' :: forall e. Headers -> ResponseM e

401 with headers

#paymentRequired Source

paymentRequired :: forall e. ResponseM e

402

#paymentRequired' Source

paymentRequired' :: forall e. Headers -> ResponseM e

402 with headers

#forbidden Source

forbidden :: forall e. ResponseM e

403

#forbidden' Source

forbidden' :: forall e. Headers -> ResponseM e

403 with headers

#notFound Source

notFound :: forall e. ResponseM e

404

#notFound' Source

notFound' :: forall e. Headers -> ResponseM e

404 with headers

#methodNotAllowed Source

methodNotAllowed :: forall e. ResponseM e

405

#methodNotAllowed' Source

methodNotAllowed' :: forall e. Headers -> ResponseM e

405 with headers

#notAcceptable Source

notAcceptable :: forall e. ResponseM e

406

#notAcceptable' Source

notAcceptable' :: forall e. Headers -> ResponseM e

406 with headers

#proxyAuthenticationRequired Source

#proxyAuthenticationRequired' Source

proxyAuthenticationRequired' :: forall e. Headers -> ResponseM e

407 with headers

#requestTimeout Source

requestTimeout :: forall e. ResponseM e

408

#requestTimeout' Source

requestTimeout' :: forall e. Headers -> ResponseM e

408 with headers

#conflict Source

conflict :: forall e. Body -> ResponseM e

409

#conflict' Source

conflict' :: forall e. Headers -> Body -> ResponseM e

409 with headers

#gone Source

gone :: forall e. ResponseM e

410

#gone' Source

gone' :: forall e. Headers -> ResponseM e

410 with headers

#lengthRequired Source

lengthRequired :: forall e. ResponseM e

411

#lengthRequired' Source

lengthRequired' :: forall e. Headers -> ResponseM e

411 with headers

#preconditionFailed Source

preconditionFailed :: forall e. ResponseM e

412

#preconditionFailed' Source

preconditionFailed' :: forall e. Headers -> ResponseM e

412 with headers

#payloadTooLarge Source

payloadTooLarge :: forall e. ResponseM e

413

#payloadTooLarge' Source

payloadTooLarge' :: forall e. Headers -> ResponseM e

413 with headers

#uRITooLong Source

uRITooLong :: forall e. ResponseM e

414

#uRITooLong' Source

uRITooLong' :: forall e. Headers -> ResponseM e

414 with headers

#unsupportedMediaType Source

unsupportedMediaType :: forall e. ResponseM e

415

#unsupportedMediaType' Source

unsupportedMediaType' :: forall e. Headers -> ResponseM e

415 with headers

#rangeNotSatisfiable Source

rangeNotSatisfiable :: forall e. ResponseM e

416

#rangeNotSatisfiable' Source

rangeNotSatisfiable' :: forall e. Headers -> ResponseM e

416 with headers

#expectationFailed Source

expectationFailed :: forall e. ResponseM e

417

#expectationFailed' Source

expectationFailed' :: forall e. Headers -> ResponseM e

417 with headers

#imATeapot Source

imATeapot :: forall e. ResponseM e

418

#imATeapot' Source

imATeapot' :: forall e. Headers -> ResponseM e

418 with headers

#misdirectedRequest Source

misdirectedRequest :: forall e. ResponseM e

421

#misdirectedRequest' Source

misdirectedRequest' :: forall e. Headers -> ResponseM e

421 with headers

#unprocessableEntity Source

unprocessableEntity :: forall e. ResponseM e

422

#unprocessableEntity' Source

unprocessableEntity' :: forall e. Headers -> ResponseM e

422 with headers

#locked Source

locked :: forall e. ResponseM e

423

#locked' Source

locked' :: forall e. Headers -> ResponseM e

423 with headers

#failedDependency Source

failedDependency :: forall e. ResponseM e

424

#failedDependency' Source

failedDependency' :: forall e. Headers -> ResponseM e

424 with headers

#upgradeRequired Source

upgradeRequired :: forall e. ResponseM e

426

#upgradeRequired' Source

upgradeRequired' :: forall e. Headers -> ResponseM e

426 with headers

#preconditionRequired Source

preconditionRequired :: forall e. ResponseM e

428

#preconditionRequired' Source

preconditionRequired' :: forall e. Headers -> ResponseM e

428 with headers

#tooManyRequests Source

tooManyRequests :: forall e. ResponseM e

429

#tooManyRequests' Source

tooManyRequests' :: forall e. Headers -> ResponseM e

429 with headers

#requestHeaderFieldsTooLarge Source

#requestHeaderFieldsTooLarge' Source

requestHeaderFieldsTooLarge' :: forall e. Headers -> ResponseM e

431 with headers

#unavailableForLegalReasons Source

#unavailableForLegalReasons' Source

unavailableForLegalReasons' :: forall e. Headers -> ResponseM e

451 with headers

#internalServerError Source

internalServerError :: forall e. Body -> ResponseM e

500

#internalServerError' Source

internalServerError' :: forall e. Headers -> Body -> ResponseM e

500 with headers

#notImplemented Source

notImplemented :: forall e. ResponseM e

501

#notImplemented' Source

notImplemented' :: forall e. Headers -> ResponseM e

501 with headers

#badGateway Source

badGateway :: forall e. ResponseM e

502

#badGateway' Source

badGateway' :: forall e. Headers -> ResponseM e

502 with headers

#serviceUnavailable Source

serviceUnavailable :: forall e. ResponseM e

503

#serviceUnavailable' Source

serviceUnavailable' :: forall e. Headers -> ResponseM e

503 with headers

#gatewayTimeout Source

gatewayTimeout :: forall e. ResponseM e

504

#gatewayTimeout' Source

gatewayTimeout' :: forall e. Headers -> ResponseM e

504 with headers

#hTTPVersionNotSupported Source

#hTTPVersionNotSupported' Source

hTTPVersionNotSupported' :: forall e. Headers -> ResponseM e

505 with headers

#variantAlsoNegotiates Source

variantAlsoNegotiates :: forall e. ResponseM e

506

#variantAlsoNegotiates' Source

variantAlsoNegotiates' :: forall e. Headers -> ResponseM e

506 with headers

#insufficientStorage Source

insufficientStorage :: forall e. ResponseM e

507

#insufficientStorage' Source

insufficientStorage' :: forall e. Headers -> ResponseM e

507 with headers

#loopDetected Source

loopDetected :: forall e. ResponseM e

508

#loopDetected' Source

loopDetected' :: forall e. Headers -> ResponseM e

508 with headers

#notExtended Source

notExtended :: forall e. ResponseM e

510

#notExtended' Source

notExtended' :: forall e. Headers -> ResponseM e

510 with headers

#networkAuthenticationRequired Source

#networkAuthenticationRequired' Source

networkAuthenticationRequired' :: forall e. Headers -> ResponseM e

511 with headers