Kevin (Kun) "Kassimo" Qian
1c2f07ffb8
Headers should not accept empty field name ( #562 )
2018-12-29 17:04:44 +08:00
Jimmy Wärting
7d3293200a
Unify internal body as buffer ( #552 )
2018-11-15 22:50:32 +08:00
Jonathan Puckey
35a4abe825
Fix spelling mistake ( #551 )
2018-11-15 11:38:19 +08:00
Jimmy Wärting
2d0fc689c6
Clone URLSearchParams to avoid mutation ( #547 )
...
* And make sure Request/Response set Content-Type per Fetch Spec
* And make sure users can read the body as string via text()
2018-11-14 00:36:44 +08:00
David Frank
5367fe6a97
v2.3.0 ( #548 )
...
* doc update
* handle corrupted location header during redirect
2018-11-13 14:35:09 +08:00
David Frank
d1ca2dfbb9
Workaround lack of global context in react-native ( #545 )
2018-11-13 12:43:27 +08:00
Joseph Nields
ecd3d52c55
Add support for AbortSignal to cancel requests ( #539 )
...
Thx @jnields @FrogTheFrog @TimothyGu for their work!
2018-11-13 12:40:11 +08:00
David Frank
1daae67e9e
Fix import style to workaround node < 10 and webpack issues. ( #544 )
...
* fix import rule for stream PassThrough
* avoid named export for compatibility below node 10
* compress flag should not overwrite accept encoding header
* doc update
* 2.2.1
2018-11-05 17:42:51 +08:00
David Frank
8cc909f5ee
update readme to add credits and call for collaborators ( #540 )
...
* also pin chai-string to ~1.3.0 as chai-string 1.5.0 introduce a breaking change that breaks our node v4 CI.
2018-10-24 14:44:16 +08:00
Jared Kantrowitz
745a27c389
README update ( #504 )
...
* v2.x readme overhaul with additions discussed in #448
added "comments" (TODO link references) for changes suggested but not yet implemented for future discussion/prs
clarified "native stream" to be "native Node streams"
adjusted all uses of http to https to encourage secure protocol usage
adjusted whatwg to proper case, WHATWG
made code block tags consistent as `js` instead of `javascript`
uppercased all method option values (post vs POST)
added spec-compliant node to the `response.ok` api section
* fix left over cruft, inconsistent hierarchy
2018-09-01 19:23:02 +08:00
Timothy Gu
09ef40e8a8
2.2.0
2018-07-22 14:31:00 -07:00
Timothy Gu
1d4ab5a0de
Switch to .mjs for ES module output for Node.js compat
...
This also reverts commit 60cf26c2f3
.
2018-07-22 14:06:25 -07:00
Timothy Gu
6868e4aa59
Add __esModule property to exports object
...
Fixes : #442
2018-07-22 14:06:25 -07:00
Timothy Gu
c01a5d22d4
Move .default assignment to plugins
2018-07-22 14:06:25 -07:00
Timothy Gu
6d7daa27c7
Migrate from mocha --compilers ( #491 )
2018-07-22 14:05:40 -07:00
Steven
ecd82580aa
Add badge to display install size ( #455 )
2018-07-22 13:34:32 -07:00
Timothy Gu
de66b388ac
Update dependencies ( #488 )
2018-07-22 09:22:10 -07:00
Timothy Gu
ed9e886cf3
Support web workers ( #487 )
...
Fixes : #485
2018-07-22 09:21:46 -07:00
Timothy Gu
b091ab5917
Fix up ArrayBufferView support ( #464 )
...
Also add more test coverage.
Fixes : #482
Closes : #484
2018-07-21 22:13:01 -07:00
Bernhard K. Weisshuhn
287bc3bdcf
test agent option `family` being passed to `lookup`
2018-06-19 12:52:13 -07:00
Bernhard K. Weisshuhn
a33d6b0de1
mention agent options `family` and `lookup` in readme for reference
2018-06-19 12:52:13 -07:00
Bernhard K. Weisshuhn
b2c5f543ce
test supplying a lookup function through an agent
2018-06-19 12:52:13 -07:00
Timothy Gu
2b7e1ab27f
Refine README example ( #463 )
...
This reverts commit fa6548ed31
(#441 ).
The autoClose option has been true by default since at least Node.js
v6.0.0. There is no need to set it once more.
Instead, make the example more realistic by handling stream outcomes
using a promise.
See #375 .
2018-05-28 12:26:22 +08:00
Nazar Mokrynskyi
5bc23d81cf
Added support for `ArrayBufferView` ( #457 )
2018-05-28 11:18:17 +08:00
Deepak
fa6548ed31
fix: add the autoClose: true to download file example ( #441 )
...
close #375
2018-04-08 10:27:47 +08:00
Timothy Gu
989c8434a9
Uninstall encoding before first Travis test run
...
encoding can be included in the Travis CI cache, and thus needs to be
manually uninstalled first.
2018-03-25 18:59:21 -07:00
Timothy Gu
6b42bd68cb
Consolidate Travis CI matrix for encoding ( #436 )
...
See: #431
2018-03-25 14:56:37 -07:00
Timothy Gu
bae5fdd306
Fix up CHANGELOG typo
...
[ci skip]
2018-03-25 14:09:14 -07:00
Timothy Gu
b80c2f56a0
v2.1.2
2018-03-25 13:55:02 -07:00
Timothy Gu
1d51752ea3
Update CHANGELOG
...
[ci skip]
2018-03-25 13:54:48 -07:00
Timothy Gu
f6683aa49c
Add a test case for invalid headers
...
See feae6d6ec8
.
2018-03-25 13:45:26 -07:00
Timothy Gu
13b230b30b
Add a test for redirect with stream body
...
See 35722f19e5
.
2018-03-25 13:45:26 -07:00
Timothy Gu
aed2e69a39
Make sure to finalize the request properly ( #432 )
...
Unfortunately, I could not write a test case that allows testing the bug
in #428 . Credits to Roman Zaharenkov <ZaharenkovRoman@gmail.com> for
discovering this long-standing bug and proposing a first version of the
fix.
Co-authored-by: Roman Zaharenkov <ZaharenkovRoman@gmail.com>
Fixes : #428
2018-03-24 20:50:33 -07:00
Mark Herhold
d522036bee
Bind fetch to window in the browser ( #434 )
2018-03-24 20:22:34 -07:00
Mark Herhold
a1cbcb5706
Support TypeScript import in browser ( #433 )
2018-03-24 11:29:00 -07:00
Timothy Gu
8aac53679d
Fix custom Host header with arbitrary case ( #430 )
...
Regression since 1592ca1148
.
Fixes : #416
Fixes : #425
2018-03-22 22:01:45 -07:00
Jason Rogers
c012c4116b
Reject when stream accumulation fails ( #415 )
...
Fixes : #414
2018-03-22 18:38:03 -07:00
William MacDonald
4c4f2f29e5
Wrap ArrayBuffer with Buffer internally to fix Body methods ( #426 )
2018-03-20 09:57:03 -07:00
Timothy Gu
fb86ab34a6
v2.1.1
2018-03-04 20:44:09 -08:00
Timothy Gu
6a9828e0b5
Update CHANGELOG
2018-03-04 20:43:54 -08:00
Timothy Gu
c7765c4498
Merge remote-tracking branch 'origin/master'
2018-03-04 20:42:55 -08:00
Timothy Gu
ccaeae096f
v2.1.0
2018-03-04 20:41:56 -08:00
Timothy Gu
780598ad72
Harmonize style ( #413 )
2018-03-04 20:29:12 -08:00
Timothy Gu
119138ef64
Update existing algorithm step numbers
2018-03-04 20:25:16 -08:00
Timothy Gu
35722f19e5
Significant rework of redirection
...
- Handle Location-less redirect like non-redirect response.
- Include bodies when redirecting to non-POST 301/302 and all 307/308
response.
Co-authored-by: Gregor Martynus <gregor@martynus.net>
2018-03-04 20:25:16 -08:00
Gregor Martynus
fc539951ca
Support ArrayBuffer as body ( #408 )
2018-03-04 16:40:39 -08:00
Timothy Gu
feae6d6ec8
Ignore illegal HTTP headers
...
Fixes : #411
2018-03-04 13:12:36 -08:00
Timothy Gu
1592ca1148
Use caseless Headers handling
...
This is unfortunately impossible to test, since the Node.js HTTP library
lower-cases all incoming headers. However, this matters for outgoing
HTTP requests. See the linked issues from the linked Fetch Standard pull
request.
See: https://github.com/whatwg/fetch/pull/476
2018-03-04 13:03:48 -08:00
Timothy Gu
a8f6d79c39
Simplify header validity check
...
See: nodejs/node@9f55eac346
See: nodejs/node@862389b0aa
2018-03-04 12:21:40 -08:00
Timothy Gu
c0950b7b9f
v2.0.0
2018-02-03 12:34:24 -08:00