HTTPRedirect class
HTTPRedirect can be used to send a 301 redirect response to the caller, where the Authority/Host and the URI in the response can be swapped with the specified values. For example, the following rule redirects requests for /v1/getProductRatings API on the ratings service to /v1/bookRatings provided by the bookratings service.
Constructors
- HTTPRedirect({String? uri, String? authority, int? redirectCode})
-
The main constructor.
const
-
HTTPRedirect.fromJson(Map<
String, dynamic> json) - Creates a HTTPRedirect from JSON data.
Properties
-
On a redirect, overwrite the Authority/Host portion of the URL with this value.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- redirectCode → int?
-
On a redirect, Specifies the HTTP status code to use in the redirect response. The default response code is MOVED_PERMANENTLY (301).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uri → String?
-
On a redirect, overwrite the Path portion of the URL with this value.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited