Skip to content

Commit

Permalink
fix: duplex only has a getter
Browse files Browse the repository at this point in the history
  • Loading branch information
wenerme committed Feb 24, 2024
1 parent 826b77b commit 892c51b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ export class Request extends GlobalRequest {
}
if (options?.body instanceof ReadableStream) {
// node 18 fetch needs half duplex mode when request body is stream
;(options as any).duplex = 'half'
Object.defineProperty(options, "duplex", {
get() {
return "half";
}
})
}
super(input, options)
}
Expand Down

0 comments on commit 892c51b

Please sign in to comment.