Module

HTTPure.Response

#Response

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

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

#ResponseM

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

send :: forall m. MonadEffect m => MonadAff m => Response -> Response -> m 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

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'

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

The same as response but with headers.

#emptyResponse

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

The same as response but without a body.

#emptyResponse'

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

The same as emptyResponse but with headers.

#continue

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

100

#continue'

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

100 with headers

#switchingProtocols

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

101

#switchingProtocols'

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

101 with headers

#processing

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

102

#processing'

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

102 with headers

#ok

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

200

#ok'

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

200 with headers

#created

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

201

#created'

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

201 with headers

#accepted

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

202

#accepted'

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

202 with headers

#nonAuthoritativeInformation

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

203

#nonAuthoritativeInformation'

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

203 with headers

#noContent

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

204

#noContent'

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

204 with headers

#resetContent

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

205

#resetContent'

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

205 with headers

#partialContent

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

206

#partialContent'

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

206 with headers

#multiStatus

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

207

#multiStatus'

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

207 with headers

#alreadyReported

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

208

#alreadyReported'

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

208 with headers

#iMUsed

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

226

#iMUsed'

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

226 with headers

#multipleChoices

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

300

#multipleChoices'

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

300 with headers

#movedPermanently

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

301

#movedPermanently'

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

301 with headers

#found

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

302

#found'

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

302 with headers

#seeOther

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

303

#seeOther'

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

303 with headers

#notModified

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

304

#notModified'

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

304 with headers

#useProxy

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

305

#useProxy'

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

305 with headers

#temporaryRedirect

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

307

#temporaryRedirect'

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

307 with headers

#permanentRedirect

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

308

#permanentRedirect'

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

308 with headers

#badRequest

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

400

#badRequest'

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

400 with headers

#unauthorized

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

401

#unauthorized'

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

401 with headers

#paymentRequired

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

402

#paymentRequired'

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

402 with headers

#forbidden

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

403

#forbidden'

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

403 with headers

#notFound

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

404

#notFound'

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

404 with headers

#methodNotAllowed

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

405

#methodNotAllowed'

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

405 with headers

#notAcceptable

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

406

#notAcceptable'

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

406 with headers

#proxyAuthenticationRequired

#proxyAuthenticationRequired'

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

407 with headers

#requestTimeout

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

408

#requestTimeout'

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

408 with headers

#conflict

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

409

#conflict'

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

409 with headers

#gone

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

410

#gone'

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

410 with headers

#lengthRequired

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

411

#lengthRequired'

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

411 with headers

#preconditionFailed

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

412

#preconditionFailed'

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

412 with headers

#payloadTooLarge

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

413

#payloadTooLarge'

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

413 with headers

#uRITooLong

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

414

#uRITooLong'

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

414 with headers

#unsupportedMediaType

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

415

#unsupportedMediaType'

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

415 with headers

#rangeNotSatisfiable

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

416

#rangeNotSatisfiable'

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

416 with headers

#expectationFailed

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

417

#expectationFailed'

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

417 with headers

#imATeapot

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

418

#imATeapot'

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

418 with headers

#misdirectedRequest

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

421

#misdirectedRequest'

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

421 with headers

#unprocessableEntity

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

422

#unprocessableEntity'

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

422 with headers

#locked

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

423

#locked'

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

423 with headers

#failedDependency

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

424

#failedDependency'

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

424 with headers

#upgradeRequired

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

426

#upgradeRequired'

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

426 with headers

#preconditionRequired

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

428

#preconditionRequired'

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

428 with headers

#tooManyRequests

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

429

#tooManyRequests'

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

429 with headers

#requestHeaderFieldsTooLarge

#requestHeaderFieldsTooLarge'

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

431 with headers

#unavailableForLegalReasons

#unavailableForLegalReasons'

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

451 with headers

#internalServerError

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

500

#internalServerError'

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

500 with headers

#notImplemented

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

501

#notImplemented'

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

501 with headers

#badGateway

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

502

#badGateway'

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

502 with headers

#serviceUnavailable

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

503

#serviceUnavailable'

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

503 with headers

#gatewayTimeout

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

504

#gatewayTimeout'

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

504 with headers

#hTTPVersionNotSupported

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

505

#hTTPVersionNotSupported'

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

505 with headers

#variantAlsoNegotiates

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

506

#variantAlsoNegotiates'

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

506 with headers

#insufficientStorage

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

507

#insufficientStorage'

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

507 with headers

#loopDetected

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

508

#loopDetected'

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

508 with headers

#notExtended

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

510

#notExtended'

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

510 with headers

#networkAuthenticationRequired

#networkAuthenticationRequired'

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

511 with headers

Modules