Skip to content

Commit 2363684

Browse files
Introduce RequestInit.duplex
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115
1 parent 8618115 commit 2363684

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fetch/api/basic/request-upload.h2.any.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,15 @@ promise_test(async (test) => {
7272
const request = new Request('', {
7373
body: new ReadableStream(),
7474
method: 'POST',
75+
duplex,
7576
});
7677

7778
assert_equals(request.headers.get('Content-Type'), null, `Request should not have a content-type set`);
7879

7980
const response = await fetch('data:a/a;charset=utf-8,test', {
8081
method: 'POST',
8182
body: new ReadableStream(),
83+
duplex,
8284
});
8385

8486
assert_equals(await response.text(), 'test', `Response has correct body`);
@@ -88,6 +90,7 @@ promise_test(async (test) => {
8890
const request = new Request('data:a/a;charset=utf-8,test', {
8991
body: new ReadableStream(),
9092
method: 'POST',
93+
duplex,
9194
});
9295

9396
assert_equals(request.headers.get('Content-Type'), null, `Request should not have a content-type set`);

0 commit comments

Comments
 (0)