We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b48918 commit f89c02aCopy full SHA for f89c02a
1 file changed
lib/src/response/response.dart
@@ -21,11 +21,16 @@ class Response {
21
/// Creates a new [Response] object.
22
external factory Response([dynamic body, ResponseOptions? options]);
23
24
+ /// Creates a new response with a different URL.
25
+ factory Response.redirect(String url, [int status = 302]) =>
26
+ _redirect(url, status);
27
+
28
/// Returns a new [Response] object associated with a network error.
29
external static Response error();
30
31
/// Creates a new response with a different URL.
- external static Response redirect(String url, [int status = 302]);
32
+ @JS('redirect')
33
+ external static Response _redirect(String url, int status);
34
}
35
36
extension ResponseInstanceMembers on Response {
0 commit comments