- From: Jake Archibald <notifications@github.com>
- Date: Thu, 25 Jun 2015 02:19:35 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
Received on Thursday, 25 June 2015 09:20:26 UTC
So: * `fetch(req)` considers the body to be optional * `cache.put(req, res)` requires the `req` body to be null (enforced by `GET`), and the `res` body to be not-null * `r.json()` etc require the body to be not-null (this would be a change) * `caches.match(req)` does not use the body of `req` * Methods that use the body, only mark it as used if it's not-null (or reject/throw if body is required) So a method that takes a request/response can be described as one of: * **Does not use body** - so `bodyUsed` has no impact * **Requires body** - throws if `bodyUsed` is true, otherwise sets `bodyUsed` * **Considers body** - throws if `bodyUsed` is true, otherwise sets `bodyUsed` if body is present --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/61#issuecomment-115180401
Received on Thursday, 25 June 2015 09:20:26 UTC