Closed Bug 1514883 Opened 6 years ago Closed 6 years ago

new Request().body returns undefined, against fetch spec

Categories

(Core :: DOM: Core & HTML, defect)

64 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1387483

People

(Reporter: michael.hart.au, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36 Steps to reproduce: Typed the following in the web console: new Request('https://www.mozilla.org', {method: 'POST', body: 'hi'}).body Actual results: It returned `undefined` Similarly, obviously: new Request('https://www.mozilla.org', {method: 'POST', body: 'hi'}).body.getReader() Throws a `... body is undefined` error Expected results: According to the fetch spec, Request should implement the Body mixin, which means it should have a `body` property: https://fetch.spec.whatwg.org/#dom-body-body https://developer.mozilla.org/en-US/docs/Web/API/Request And this property should return a ReadableStream if the body exists.
I could reproduce the issue on User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM
Ever confirmed: true
Product: Firefox → Core
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.