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 = Aff 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 :: Response -> Response -> Effect 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 :: Status -> Body -> ResponseM

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

#response' Source

response' :: Status -> Headers -> Body -> ResponseM

The same as response but with headers.

#emptyResponse Source

emptyResponse :: Status -> ResponseM

The same as response but without a body.

#emptyResponse' Source

emptyResponse' :: Status -> Headers -> ResponseM

The same as emptyResponse but with headers.

#continue Source

#continue' Source

continue' :: Headers -> ResponseM

100 with headers

#switchingProtocols Source

#switchingProtocols' Source

switchingProtocols' :: Headers -> ResponseM

101 with headers

#processing Source

#processing' Source

processing' :: Headers -> ResponseM

102 with headers

#ok Source

ok :: Body -> ResponseM

200

#ok' Source

ok' :: Headers -> Body -> ResponseM

200 with headers

#created Source

#created' Source

created' :: Headers -> ResponseM

201 with headers

#accepted Source

#accepted' Source

accepted' :: Headers -> ResponseM

202 with headers

#nonAuthoritativeInformation Source

#nonAuthoritativeInformation' Source

#noContent Source

#noContent' Source

noContent' :: Headers -> ResponseM

204 with headers

#resetContent Source

#resetContent' Source

resetContent' :: Headers -> ResponseM

205 with headers

#partialContent Source

#partialContent' Source

partialContent' :: Headers -> Body -> ResponseM

206 with headers

#multiStatus Source

#multiStatus' Source

multiStatus' :: Headers -> Body -> ResponseM

207 with headers

#alreadyReported Source

#alreadyReported' Source

alreadyReported' :: Headers -> ResponseM

208 with headers

#iMUsed Source

#iMUsed' Source

iMUsed' :: Headers -> Body -> ResponseM

226 with headers

#multipleChoices Source

#multipleChoices' Source

multipleChoices' :: Headers -> Body -> ResponseM

300 with headers

#movedPermanently Source

#movedPermanently' Source

movedPermanently' :: Headers -> Body -> ResponseM

301 with headers

#found Source

found :: Body -> ResponseM

302

#found' Source

found' :: Headers -> Body -> ResponseM

302 with headers

#seeOther Source

#seeOther' Source

seeOther' :: Headers -> Body -> ResponseM

303 with headers

#notModified Source

#notModified' Source

notModified' :: Headers -> ResponseM

304 with headers

#useProxy Source

#useProxy' Source

useProxy' :: Headers -> Body -> ResponseM

305 with headers

#temporaryRedirect Source

#temporaryRedirect' Source

temporaryRedirect' :: Headers -> Body -> ResponseM

307 with headers

#permanentRedirect Source

#permanentRedirect' Source

permanentRedirect' :: Headers -> Body -> ResponseM

308 with headers

#badRequest Source

#badRequest' Source

badRequest' :: Headers -> Body -> ResponseM

400 with headers

#unauthorized Source

#unauthorized' Source

unauthorized' :: Headers -> ResponseM

401 with headers

#paymentRequired Source

#paymentRequired' Source

paymentRequired' :: Headers -> ResponseM

402 with headers

#forbidden Source

#forbidden' Source

forbidden' :: Headers -> ResponseM

403 with headers

#notFound Source

#notFound' Source

notFound' :: Headers -> ResponseM

404 with headers

#methodNotAllowed Source

#methodNotAllowed' Source

methodNotAllowed' :: Headers -> ResponseM

405 with headers

#notAcceptable Source

#notAcceptable' Source

notAcceptable' :: Headers -> ResponseM

406 with headers

#proxyAuthenticationRequired Source

#proxyAuthenticationRequired' Source

#requestTimeout Source

#requestTimeout' Source

requestTimeout' :: Headers -> ResponseM

408 with headers

#conflict Source

#conflict' Source

conflict' :: Headers -> Body -> ResponseM

409 with headers

#gone' Source

gone' :: Headers -> ResponseM

410 with headers

#lengthRequired Source

#lengthRequired' Source

lengthRequired' :: Headers -> ResponseM

411 with headers

#preconditionFailed Source

#preconditionFailed' Source

preconditionFailed' :: Headers -> ResponseM

412 with headers

#payloadTooLarge Source

#payloadTooLarge' Source

payloadTooLarge' :: Headers -> ResponseM

413 with headers

#uRITooLong Source

#uRITooLong' Source

uRITooLong' :: Headers -> ResponseM

414 with headers

#unsupportedMediaType Source

#unsupportedMediaType' Source

unsupportedMediaType' :: Headers -> ResponseM

415 with headers

#rangeNotSatisfiable Source

#rangeNotSatisfiable' Source

rangeNotSatisfiable' :: Headers -> ResponseM

416 with headers

#expectationFailed Source

#expectationFailed' Source

expectationFailed' :: Headers -> ResponseM

417 with headers

#imATeapot Source

#imATeapot' Source

imATeapot' :: Headers -> ResponseM

418 with headers

#misdirectedRequest Source

#misdirectedRequest' Source

misdirectedRequest' :: Headers -> ResponseM

421 with headers

#unprocessableEntity Source

#unprocessableEntity' Source

unprocessableEntity' :: Headers -> ResponseM

422 with headers

#locked Source

#locked' Source

locked' :: Headers -> ResponseM

423 with headers

#failedDependency Source

#failedDependency' Source

failedDependency' :: Headers -> ResponseM

424 with headers

#upgradeRequired Source

#upgradeRequired' Source

upgradeRequired' :: Headers -> ResponseM

426 with headers

#preconditionRequired Source

#preconditionRequired' Source

preconditionRequired' :: Headers -> ResponseM

428 with headers

#tooManyRequests Source

#tooManyRequests' Source

tooManyRequests' :: Headers -> ResponseM

429 with headers

#requestHeaderFieldsTooLarge Source

#requestHeaderFieldsTooLarge' Source

#unavailableForLegalReasons Source

#unavailableForLegalReasons' Source

#internalServerError Source

#internalServerError' Source

internalServerError' :: Headers -> Body -> ResponseM

500 with headers

#notImplemented Source

#notImplemented' Source

notImplemented' :: Headers -> ResponseM

501 with headers

#badGateway Source

#badGateway' Source

badGateway' :: Headers -> ResponseM

502 with headers

#serviceUnavailable Source

#serviceUnavailable' Source

serviceUnavailable' :: Headers -> ResponseM

503 with headers

#gatewayTimeout Source

#gatewayTimeout' Source

gatewayTimeout' :: Headers -> ResponseM

504 with headers

#hTTPVersionNotSupported Source

#hTTPVersionNotSupported' Source

#variantAlsoNegotiates Source

#variantAlsoNegotiates' Source

#insufficientStorage Source

#insufficientStorage' Source

insufficientStorage' :: Headers -> ResponseM

507 with headers

#loopDetected Source

#loopDetected' Source

loopDetected' :: Headers -> ResponseM

508 with headers

#notExtended Source

#notExtended' Source

notExtended' :: Headers -> ResponseM

510 with headers

#networkAuthenticationRequired Source

#networkAuthenticationRequired' Source