[Webkit-unassigned] [Bug 212858] Request object's text, json, arrayBuffer function do not work even though devtools shows that request the request object has these properties.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 9 22:46:21 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=212858

--- Comment #9 from Tom <motfalcon+wekbitbugs at gmail.com> ---
Agree with the suggested new title.

The problem is not to do with *making* the requests but with preparing them.

I think this test captures the issue:

new Request('http://localhost', {method: 'POST', body: new FormData()}).arrayBuffer().then(()=>console.log('success')).catch(err=>console.error('Fail: ' + err.message))

In Safari, this will "fail". In Chrome it will succeed.

The reason I'm here is that Safari 13.1 introduced FormData support in Service Workers (yay, this is good news). But that meant my polyfill deferred to the new native implementation, but the native implementation cannot handle a Request with FormData as the body. The same behaviour is present in the main/UI thread too, so at least things are consistent I guess.

So I'm asking, it would be nice if Request.arrayBuffer() could handle a FormData body :D

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200610/9a316b40/attachment.htm>


More information about the webkit-unassigned mailing list