We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfe2c97 commit d5344a3Copy full SHA for d5344a3
test/io/request_test.dart
@@ -46,6 +46,15 @@ void main() {
46
expect(response.statusCode, equals(302));
47
});
48
49
+ test('with redirects', () async {
50
+ final request = http.Request('GET', serverUrl.resolve('/redirect'));
51
+ final response = await request.send();
52
+
53
+ expect(response.statusCode, equals(200));
54
+ final bytesString = await response.stream.bytesToString();
55
+ expect(bytesString, parse(containsPair('path', '/')));
56
+ });
57
58
test('exceeding max redirects', () async {
59
final request = http.Request('GET', serverUrl.resolve('/loop?1'))
60
..maxRedirects = 2;
0 commit comments