Closed tgvashworth closed 8 years ago
For this we actually need two functions: an input normaliser (RequestInfo input, optional RequestInit init) => Request
, and a fetch method that only accepts a Request
.
This should be as simple as passing the arguments into a Request constructor at the start of the fetchEngine inner function, but currently this doesn't work. See #48.
Have added isomorphic-fetch as a dependency for the time being, so fetch-engine works. If we need to improve this in future, we can reopen.
Request
andResponse
should be come first, as per #13.Implement & test fetch from the fetch spec.
Probably a new file in
src
calledfetch.ts
with a matchingfetch.test.ts
file. It should implement theFetch
type from /src/.d.ts:For now, this only need to run in the browser (don't worry about node).
We should file another issue about running these test across many browsers.