const classafBedSheet::HttpRedirect
sys::Obj afBedSheet::HttpRedirect
(Response Object) - Use to send redirect 3xx status codes to the client. Handles the differences in HTTP 1.0 and HTTP 1.1.
HttpRedirect.movedTemporarily(`/newUrl`)
@see
- afterPost
static new afterPost(Uri redirectTo)
Use when the client should perform a HTTP GET to the returned location. Typically this is when you implement the Redirect After Post paradigm.
- 302 for HTTP 1.0
- 303 for HTTP 1.1
- afterPostErr
static ReProcessErr afterPostErr(Uri redirectTo)
Throw to send a redirect to the client. Use in exceptional cases where it may not be suitable / possible to return a
Redirect
instance.throw HttpRedirect.afterPostErr(`/some/other/page.html`)
- location
const Uri location
The URL to redirect to.
- movedPermanently
static new movedPermanently(Uri redirectTo)
Sends a
Moved Permanently
response to the client with the following status codes:- 301 for HTTP 1.0
- 308 for HTTP 1.1
The client should use the same HTTP method when requesting the redirect.
- movedPermanentlyErr
static ReProcessErr movedPermanentlyErr(Uri redirectTo)
Throw to send a redirect to the client. Use in exceptional cases where it may not be suitable / possible to return a
Redirect
instance.throw HttpRedirect.movedPermanentlyErr(`/some/other/page.html`)
- movedTemporarily
static new movedTemporarily(Uri redirectTo)
Sends a
Moved Temporarily
response to the client with the following status codes:- 302 for HTTP 1.0
- 307 for HTTP 1.1
The client should use the same HTTP method when requesting the redirect.
- movedTemporarilyErr
static ReProcessErr movedTemporarilyErr(Uri redirectTo)
Throw to send a redirect to the client. Use in exceptional cases where it may not be suitable / possible to return a
Redirect
instance.throw HttpRedirect.movedTemporarilyErr(`/some/other/page.html`)
- type
const HttpRedirectType type
Type combined with the HTTP version determines the HTTP status code to return.