diff --git a/src/net/http/roundtrip_js.go b/src/net/http/roundtrip_js.go index 336c413cea23c8..cb4a4392b51985 100644 --- a/src/net/http/roundtrip_js.go +++ b/src/net/http/roundtrip_js.go @@ -60,7 +60,9 @@ func (t *Transport) RoundTrip(req *Request) (*Response, error) { return nil, err } req.Body.Close() - opt.Set("body", body) + a := js.TypedArrayOf(body) + defer a.Release() + opt.Set("body", a) } respPromise := js.Global().Call("fetch", req.URL.String(), opt) var (