Redirect class

Response that redirects to the URI specified by body

Inheritance

Constructors

Redirect(Uri body, {dynamic statusCode = HttpStatus.movedPermanently, Map<String, dynamic>? headers, List<Cookie>? cookies})
Redirect.found(dynamic body, {Map<String, dynamic>? headers, dynamic statusCode = HttpStatus.movedTemporarily, List<Cookie>? cookies})
Performs 'moved temporarily' (status code: 302) redirect
factory
Redirect.permanentRedirect(dynamic body, {Map<String, dynamic>? headers, dynamic statusCode = 308, List<Cookie>? cookies})
Performs 'permanent redirect' (status code: 308) redirect
factory
Redirect.seeOther(dynamic body, {Map<String, dynamic>? headers, dynamic statusCode = HttpStatus.seeOther, List<Cookie>? cookies})
Performs 'see other' (status code: 303) redirect
factory
Redirect.temporaryRedirect(dynamic body, {Map<String, dynamic>? headers, dynamic statusCode = HttpStatus.temporaryRedirect, List<Cookie>? cookies})
Performs 'temporary redirect' (status code: 307) redirect
factory

Properties

body Uri?
Body of the response
getter/setter pairinherited
cookies List<Cookie>
Cookies
finalinherited
hashCode int
The hash code for this object.
no setterinherited
headers JaguarHttpHeaders
Headers
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
Status code of the response
getter/setter pairinherited

Methods

deleteCookie(String name, {String path = '/'}) → void
deleteCookie deletes a cookie with given name. Use path to specify the path from which the cookie has to be removed.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
writeAllButBody(HttpResponse resp) → void
inherited
writeResponse(HttpResponse resp) Future<void>
Writes body of the HTTP response from body property
override

Operators

operator ==(Object other) bool
The equality operator.
inherited