Module

Solid.Start.Response

Package
purescript-purs-solid
Repository
arazorda/purs-solid

Responses. httpStatus / httpHeader declare the response head while server rendering; they're withdrawn if their scope is disposed before the head is sent, and do nothing on the client. A Reply is what a router action or server function returns to redirect, revalidate, or set a status.

#httpStatus Source

#httpStatusText Source

#appendHttpHeader Source

#ReplyOptions Source

type ReplyOptions :: Row Typetype ReplyOptions = (revalidate :: Array QueryKey, status :: Int, statusText :: String)

#reply Source

reply :: forall b. b -> Reply b

A plain result.

#redirect Source

redirect :: forall b. String -> Reply b

#redirectWith Source

redirectWith :: forall b given missing. Union given missing ReplyOptions => Record given -> String -> Reply b

Takes any subset of ReplyOptions.

#reload Source

reload :: forall b. Reply b

Revalidates the page's data without a value.

#reloadWith Source

reloadWith :: forall b given missing. Union given missing ReplyOptions => Record given -> Reply b

#respond Source

respond :: forall b. b -> Reply b

A result with a status or revalidation keys.

#respondWith Source

respondWith :: forall b given missing. Union given missing ReplyOptions => Record given -> b -> Reply b

Re-exports from Solid.Internal.Reply

#Reply Source

data Reply t0

A result of b, or a redirect or reload with no value.