- From: Brenton Simpson <notifications@github.com>
- Date: Wed, 06 May 2015 08:22:38 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
Received on Wednesday, 6 May 2015 15:23:10 UTC
I disagree about it being too magic. The spec already has "magic" cases for `Blob`, `FormData`, `URLSearchParams`, and `USVString`. This would extend that to JSON, which adds symmetry with `response.json()` and paves the cowpath, since so many modern APIs expect JSON. @annevk - is `body.constructor === Object || Array.isArray(body) || body.toJSON === function` a fair test? That covers the common cases without adding a weird edge for Strings (which you probably don't want to stringify anyway). --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/47#issuecomment-99512789
Received on Wednesday, 6 May 2015 15:23:10 UTC