Closed rorticus closed 7 years ago
@@ master #243 diff @@
==========================================
Files 47 48 +1
Lines 2457 2519 +62
Methods 28 29 +1
Messages 0 0
Branches 464 477 +13
==========================================
- Hits 2404 2381 -23
Misses 51 51
- Partials 2 87 +85
Powered by Codecov. Last update d2bbb57...1d35e74
Not sure if anyone else will get the opportunity to review this 🎱
A few stray thoughts that are probably worth addressing mostly later as we decide how useful the fetch API might be:
the fetch API doesn't seem to have a convenience method for json, so the user must explicitly parse json? Is that how our request implementation works also?
We have a response filter that runs at a "higher level" that will turn the json type into an actual JSON object.
the fetch API seems to implement ReadableStream... I assume we're planning to ignore that for now given the size of the streams shim?
I'm OK with ignoring that :) If we do decide to implement it, we should at least figure out how we're going to pull in streams
without the dependency in the node request.
are we ignoring the type Document (I see we have arraybuffer and blob), or does that get parsed the same way as plain text?
It'll get parsed as plain text.
the fetch API has a number of scenarios around cors, requestType, requestDestination, etc. Do we plan to/need to support these features now or in the future?
That is a great question :) I've ignored them for now because we didn't have anything similar in the xhr/node requests, but adding those options might be a compelling reason why someone would want to use the fetch API over the alternatives.
Dylan's comments have been split into https://github.com/dojo/core/issues/255 and https://github.com/dojo/core/issues/254 to get this landed.
Added
request/fetch
for performing requests based on thefetch
API.