node-fetch/LIMITS.md

22 lines
865 B
Markdown
Raw Normal View History

2015-01-26 09:46:32 -08:00
2015-05-03 03:07:20 -07:00
Known differences
=================
2015-01-26 09:46:32 -08:00
2015-01-27 10:02:27 -08:00
*As of 1.x release*
2015-01-26 09:46:32 -08:00
2015-01-27 05:11:26 -08:00
- Topics such as cross-origin, content security policy, mixed content, service workers are ignored, given our server-side context.
2015-01-26 09:46:32 -08:00
- Url input must be an absolute url, using either `http` or `https` as scheme.
2015-01-27 05:11:26 -08:00
- On the upside, there are no forbidden headers, and `res.url` contains the final url when following redirects.
2015-01-26 09:46:32 -08:00
2015-01-27 05:11:26 -08:00
- For convenience, `res.body` is a transform stream, so decoding can be handled independently.
2015-01-26 09:46:32 -08:00
2016-08-03 03:02:26 -07:00
- Similarly, `req.body` can either be a string, a buffer or a readable stream.
2015-01-26 09:46:32 -08:00
2016-04-05 10:32:37 -07:00
- Also, you can handle rejected fetch requests through checking `err.type` and `err.code`.
2016-08-03 03:02:26 -07:00
- Only support `res.text()`, `res.json()`, `res.buffer()` at the moment, until there are good use-cases for blob/arrayBuffer.
2015-01-27 10:02:27 -08:00
2015-01-27 05:11:26 -08:00
- There is currently no built-in caching, as server-side caching varies by use-cases.