RedirectResponse class

A Redirect specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.

Constructors

RedirectResponse({required Input<String> glob, required Input<String> location, required Input<String> regex, required Input<int> statusCode})
Creates a new RedirectResponse. glob The user-supplied glob to match against the request URL path. location The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a : prefix to identify the segment and an optional * to capture the rest of the URL. For example: "glob": "/:capture*", "statusCode": 301, "location": "https://example.com/foo/:capture" regex The user-supplied RE2 regular expression to match against the request URL path. statusCode The status HTTP code to return in the response. It must be a valid 3xx status code.
const
RedirectResponse.fromMap(Map<String, dynamic> map)
factory

Properties

glob → Input<String>
The user-supplied glob to match against the request URL path.
final
hashCode → int
The hash code for this object.
no setterinherited
location → Input<String>
The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a : prefix to identify the segment and an optional * to capture the rest of the URL. For example: "glob": "/:capture*", "statusCode": 301, "location": "https://example.com/foo/:capture"
final
regex → Input<String>
The user-supplied RE2 regular expression to match against the request URL path.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statusCode → Input<int>
The status HTTP code to return in the response. It must be a valid 3xx status code.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

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