Tino Vyatkin
f0d0675d00
Remove unneeded is-stream and buffer-to-arraybuffer ( #241 )
2017-02-26 18:29:57 -08:00
Timothy Gu
e284841db9
test: use fetch.Promise consistently
...
On Node.js v4, Babel polyfills `Promise`.
2017-02-26 17:00:01 -08:00
Timothy Gu
a345c398b3
More documentation
2017-02-26 16:52:32 -08:00
Timothy Gu
25e43a8f3e
Export FetchError and update ERROR-HANDLING.md
2017-02-26 16:46:34 -08:00
Timothy Gu
55e573b741
Back to 100% coverage
2017-02-26 15:30:43 -08:00
Timothy Gu
b899649c32
Remove bluebird
2017-02-26 14:42:46 -08:00
Timothy Gu
9e140039ac
Factor out Body mixin
2017-02-26 14:42:09 -08:00
Timothy Gu
f08b120771
Do not inherit from body
...
Per spec, make Body a proper mixin
2017-02-26 14:29:40 -08:00
Timothy Gu
56f786f896
Update deps and remove 0.12 compat
2017-02-26 14:12:45 -08:00
Timothy Gu
a10f5786bd
Consolidate CHANGELOG
2017-02-26 13:50:38 -08:00
Timothy Gu
67678a9a54
Update UPGRADE-GUIDE
2017-02-26 13:45:25 -08:00
Timothy Gu
d23204b4ec
README: remove trailing whitespace
2017-02-26 13:18:41 -08:00
Tino Vyatkin
edb28a6c50
Drop Node.js v0.12 support ( #240 )
2017-02-26 13:17:47 -08:00
Ahmad Nassri
673ebb2089
docs(defaults): list of default header values ( #237 )
...
Fixes #226 .
2017-02-21 12:38:54 -08:00
Timothy Gu
560d5d6a02
2.0.0-alpha.3
2017-01-29 10:35:31 -08:00
Timothy Gu
11a9481405
request: overwrite Content-Length if possible
...
Also reorganize header normalization
2017-01-29 10:06:54 -08:00
Timothy Gu
ac8ddaccb8
Improve Headers constructor argument processing
2017-01-29 08:58:16 -08:00
Timothy Gu
db733374dd
Fix CHANGELOG for v2.0.0-alpha.2
...
[ci skip]
2017-01-28 08:42:17 -08:00
Timothy Gu
e9db869523
Remove FOLLOW_SPEC option; make it the default behavior ( #225 )
...
* Remove !FOLLOW_SPEC mode
* Update UPGRADE-GUIDE
* Add CHANGELOG entry
2017-01-23 07:54:28 -08:00
Timothy Gu
95bf356c4d
Use babel-preset-env
2017-01-22 17:14:55 -08:00
Timothy Gu
7539115bcc
Silent rollup warning
2017-01-22 17:08:11 -08:00
Timothy Gu
908f661664
2.0.0-alpha.1
...
Fixes #8 .
Fixes #209 .
Fixes #222 .
2017-01-14 21:36:08 -08:00
Timothy Gu
8cf1541fb0
Merge pull request #177 from bitinn/v2
...
node-fetch v2
2017-01-14 21:33:01 -08:00
Timothy Gu
502b604208
Fix Headers iterable initializer handling
2017-01-14 21:22:23 -08:00
Timothy Gu
f198f93767
test: remove fallbacks for Node.js 0.10
2017-01-14 20:56:26 -08:00
Timothy Gu
151de2bdfb
Use ES2015 export syntax ( #212 )
...
* Implement Rollup's external module check
* Use ES2015 export syntax
More friendly to ES2015 environments.
2017-01-14 20:50:10 -08:00
Timothy Gu
7970491000
Use template literals in Request
...
Closes #217 .
2016-12-14 15:45:00 -08:00
Nathan Rajlich
fa22529128
proper stack first line for FetchError instances ( #215 )
...
The `.stack` property gets cached in the `captureStackTrace()` call, so
whatever is set as the `name` and `message` at that time will be used
for the first line of the stack trace.
Before this patch, FetchError's stack would just say "Error" as the
first line. Now they correctly display the "${name}: ${message}" of the
error instances.
Test case included.
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2016-12-14 15:41:35 -08:00
Timothy Gu
7f92825411
Upgrade Rollup
2016-12-14 13:54:31 -08:00
Timothy Gu
01bf40d5a4
Slightly expand upgrade guide
2016-12-14 13:51:43 -08:00
Timothy Gu
29e9f5eef6
Add guide to upgrade to v2
2016-12-12 13:50:05 -08:00
Timothy Gu
9351084a98
Update README for ES2015
2016-12-12 12:55:28 -08:00
Jimmy Karl Roland Wärting
030bf27943
Documentation update for v2 ( #214 )
2016-12-08 19:18:06 -08:00
Timothy Gu
0f7e6c15d3
Back to 100%
2016-12-05 21:20:00 -08:00
Timothy Gu
4a153ff004
Update changelog
...
See #209 .
2016-12-05 20:42:00 -08:00
Timothy Gu
90d3bc4436
Set content-length for buffer bodies
2016-12-05 20:30:00 -08:00
Timothy Gu
a604069860
More exact content-type and content-length
...
Set content-type of requests with body being objects to text/plain
2016-12-05 20:27:08 -08:00
Timothy Gu
385ca6b2b0
To 100% branches coverage
2016-12-05 19:48:59 -08:00
Timothy Gu
552c1a601d
Bring coverage up to 100%
2016-12-05 18:46:02 -08:00
Timothy Gu
4d944365df
Fix tests added in the last commit
2016-12-05 15:21:19 -08:00
Timothy Gu
e7a13a5314
Add support for blobs
2016-12-05 15:06:22 -08:00
Timothy Gu
cc4ace1778
Make body default to null in Request
...
Fixes #208 .
2016-12-04 13:16:03 -08:00
Timothy Gu
3d676235a8
Throw when a GET/HEAD Request is created with body
...
As mandated by the spec
2016-12-04 13:15:03 -08:00
Timothy Gu
70f61e0c7d
Split http.request options generation
2016-11-26 15:10:23 -08:00
Timothy Gu
0285828fb8
Split Content-Type extraction to Request and Body
...
It is done in this way in the spec.
2016-11-26 15:10:23 -08:00
Timothy Gu
d3071fa46a
Revert "Return empty .json() object on 204. Fix #165 . ( #166 )" ( #201 )
...
This reverts commit 95b58936b8
.
Fixes #165 .
2016-11-26 09:07:12 -08:00
Timothy Gu
7f0e50260e
Add a polyfill for Node.js v0.12's broken %IteratorPrototype%
2016-11-23 15:26:35 -08:00
Timothy Gu
25ff99677d
Improve Headers' iteration support
...
Class strings, spec-compliant forEach, etc.
2016-11-23 15:06:30 -08:00
Timothy Gu
4ae42ea5ee
Fix class names for prototypes
...
Per Web IDL specification.
2016-11-23 14:36:21 -08:00
Timothy Gu
25d139a4d0
Officially drop support for 0.10
...
Current LTS releases are added.
2016-11-23 11:50:36 -08:00