PageServerResponse data error
json : Json.Encode.Value -> Response data error
plainText : String -> Response data error
temporaryRedirect : String -> Response data error
permanentRedirect : String -> Response data error
Build a 308 permanent redirect response.
Permanent redirects tell the browser that a resource has permanently moved. If you redirect because a user is not logged in, then you do not want to use a permanent redirect because the page they are looking for hasn't changed, you are just temporarily pointing them to a new page since they need to authenticate.
Permanent redirects are aggressively cached so be careful not to use them when you mean to use temporary redirects instead.
If you need to specifically rely on a 301 permanent redirect (see https://stackoverflow.com/a/42138726 on the difference between 301 and 308),
use customResponse
instead.
emptyBody : Response data error
body : String -> Response data error
bytesBody : Bytes -> Response data error
base64Body : String -> Response data error
render : data -> Response data error
errorPage : errorPage -> Response data errorPage
mapError : (errorPage -> mappedErrorPage) -> Response data errorPage -> Response data mappedErrorPage
map : (data -> mappedData) -> Response data error -> Response mappedData error
withHeader : String -> String -> Response data error -> Response data error
withHeaders : List ( String, String ) -> Response data error -> Response data error
withStatusCode : Basics.Int -> Response data Basics.Never -> Response data Basics.Never
withSetCookieHeader : Server.SetCookie.SetCookie -> Response data error -> Response data error
toJson : Response Basics.Never Basics.Never -> Json.Encode.Value