Skip to content

Commit 2c13d48

Browse files
Introduce RequestInit.duplex
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115
1 parent 951f968 commit 2c13d48

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

+3
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@ promise_test(async (test) => {
5959
const request = new Request('', {
6060
body: new ReadableStream(),
6161
method: 'POST',
62+
duplex,
6263
});
6364

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

6667
const response = await fetch('data:a/a;charset=utf-8,test', {
6768
method: 'POST',
6869
body: new ReadableStream(),
70+
duplex,
6971
});
7072

7173
assert_equals(await response.text(), 'test', `Response has correct body`);
@@ -75,6 +77,7 @@ promise_test(async (test) => {
7577
const request = new Request('data:a/a;charset=utf-8,test', {
7678
body: new ReadableStream(),
7779
method: 'POST',
80+
duplex,
7881
});
7982

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

0 commit comments

Comments
 (0)