Russell Dempsey
6ae9c76481
docs(readme): response.clone() is not async ( #1560 )
...
source code shows response is a sync call to a new Response constructor: 3944f24770/src/response.js (L84-L101)
2022-05-20 14:55:15 +02:00
Felipe Contreras
043a5fcfc8
Fix leaking listeners ( #1295 ) ( #1474 )
...
Since 8eeeec1
it seems listeners have been leaking on keep-alive
sockets.
Apparently abort() has been deprecated since v17, using close() the
onSocketClose listener is properly removed, and by creating a new onData
function I'm able to remove the 'data' listener too.
2022-05-07 23:56:37 +02:00
Alex Kondratyuk
004b3ac832
fix: don't uppercase unknown methods ( #1542 )
...
* fix: don't uppercase unknown methods
2022-04-28 11:33:26 +02:00
Sashank999
c33e393c47
Fix Code of Conduct link in Readme. ( #1532 )
2022-04-14 15:15:02 +02:00
George B
6875205c1a
docs: Fix link markup to Options definition ( #1525 )
2022-03-28 12:07:18 +03:00
Jimmy Wärting
6425e2021a
fix: handle bom in text and json ( #1482 )
...
* fix: handle bom in text and json
* add test for text and arraybuffer as well
2022-03-11 22:49:14 +01:00
Jimmy Wärting
a4ea5f9308
fix: add missing formdata export to types ( #1518 )
...
* fix: add missing formdata export to types
closes #1517 1517
2022-03-07 11:56:34 +01:00
Software and Outsourcing
61b3b5a063
fix: cancel request example import ( #1513 )
...
* Fix example
* Fix formatting
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
2022-03-01 10:54:27 +01:00
csimpf
5e78af3ba7
Replace changelog with valid url ( #1506 )
2022-02-11 09:13:57 +01:00
David Glasser
9014db7998
types: support `agent: false` ( #1502 )
...
The `agent` option is (after being potentially called as as function)
passed directly to `http.request`. This is allowed to be
a boolean; `http.request` interprets `agent: false` as
"allocate a one-off Agent for this request", which is
distinct from `agent: undefined` which means to use a
default shared agent.
This PR updates the TS types to match the existing behavior.
2022-02-09 23:22:25 +01:00
Dany Gagnon
2e1f3a56d1
chore: fix typo in credential error message ( #1496 )
2022-02-03 08:28:57 +01:00
rieg-ec
4ce2ce5f1b
docs(readme): fix typo ( #1489 )
2022-01-27 16:48:55 +01:00
Jimmy Wärting
ba23fd2fd0
docs: remove the changelog ( #1464 )
...
* Delete CHANGELOG.md
* Update PULL_REQUEST_TEMPLATE.md
2022-01-24 15:21:03 +01:00
Jimmy Wärting
8fedc1b8df
core: move support and feature to discussion ( #1471 )
2022-01-24 13:22:46 +01:00
Jimmy Wärting
0b43b9f905
docs: update formdata example ( #1465 )
...
* docs: update formdata and blob examples
* lint fixes
* tab to space
* tab to space
* tab to space
2022-01-22 00:36:54 +01:00
Jimmy Wärting
81b1378bb3
feat: export Blob, File and FormData + utilities ( #1463 )
...
* feat: export FormData, Blob and Files
* use import from index instead
* sort a-z
* explicit export
* bump version
* xo lint
2022-01-20 21:42:44 +01:00
Gregor Martynus
b2f5d8d3fa
ci: semantic-release ( #1270 )
...
* ci: semantic-release
* docs(CONTRIBUTING): initial version
* ci(semantic-pull-request): Always validate the PR title, and ignore the commits
* docs(CONTRIBUTING): ammend note on "Create a merge commit" button
* Update CONTRIBUTING.md
* Update semantic.yml
2022-01-20 19:41:36 +01:00
Jimmy Wärting
015798edc6
test: Modernize and convert some test in `main.js` to async/await ( #1456 )
...
* convert some test to async/await
* Update main.js
* use await
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
* take back should accept custom HoSt header
* remove trailing space
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
2022-01-17 21:48:43 +01:00
Jimmy Wärting
1028f83708
test: Update major busboy version ( #1457 )
...
* test: update busboy
* make linter happy
2022-01-17 16:37:55 +01:00
Maciej Goszczycki
dd2cea4672
Handle zero-length OK deflate responses (master) ( #965 )
...
* Handle zero-length OK deflate responses
* Also handle pump callback in the deflate branch
* Update the use of pump everywhere and link to the original PR
* Address lints
2022-01-17 00:41:37 +01:00
Linus Unnebäck
92dee097c6
Simplify check in isDomainOrSubdomain ( #1455 )
2022-01-16 16:08:23 +01:00
Jimmy Wärting
36e47e8a64
3.1.1 release ( #1451 )
2022-01-16 13:24:18 +01:00
Travis D. Warlick, Jr
5304f3f7f7
Don't change relative location header on manual redirect ( #1105 )
...
* Don't change relative location header on manual redirect
* c8 ignores for node-version-specific code and fix c8 ignore in Headers constructor
2022-01-15 22:08:16 +01:00
Jimmy Wärting
f5d3cf5e25
fix(Headers): don't forward secure headers to 3th party ( #1449 )
...
* fix(Headers): don't forward secure headers to 3th party
* added more narrow test for isDomainOrSubdomain
2022-01-14 15:55:41 +01:00
Jamie Slome
f2c3d56375
Create SECURITY.md ( #1445 )
2022-01-08 14:21:04 +01:00
Jimmy Wärting
4ae35388b0
core: Warn when using data ( #1421 )
...
* Add a warning when using .data in RequestInit
* Add a warning when using .data in Response
* Switch custom solution for utils.deprecate
* Remove unused line in request tests
* moved error handler into the body class
* lint fix
Co-authored-by: Lubomir <lubomir.yudenko@gmail.com>
2022-01-08 14:19:27 +01:00
dnalborczyk
41f53b9065
fix: use more node: protocol imports ( #1428 )
...
* fix: use node: protocol
* use node: protocol in readme
2021-12-28 16:39:53 +01:00
dnalborczyk
f674875f98
ci: fix main branch ( #1429 )
2021-12-28 16:39:23 +01:00
Jimmy Wärting
1493d046bc
core: Don't use global buffer ( #1422 )
...
* remove unused file
* two test is coveraged by the Uint8Array test
* use arrayBuffer to test base64 instead
* avoid testing buffer
* avoid using Buffer
* import buffer module
* use one same textEncoder
* import stream consumer that can test iterable objects
* fix a test
* fix test where type should be empty
2021-12-21 20:34:30 +01:00
Maxim Shirshin
eb33090b81
Chore: Fix logical operator priority (regression) to disallow GET/HEAD with non-empty body ( #1369 )
2021-12-06 17:14:42 +01:00
Adam
7ba5bc9e0a
update readme for TS @type/node-fetch ( #1405 )
...
Co-authored-by: adamellsworth <adam.d.ellsworth@me.com>
2021-12-06 17:03:27 +01:00
Jimmy Wärting
6956bf868b
core: Don't use buffer to make a blob ( #1402 )
2021-11-30 10:40:04 +01:00
Tasos Bitsios
6e4c1e4f67
fix(Redirect): Better handle wrong redirect header in a response ( #1387 )
...
* Fixed crash when an invalid Location URL is returned from a redirect. Fixes #1386
* CHANGELOG entry
* changed catch(e) -> catch(error) to match rest of code, added comment
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
* suppress error on invalid redirect URL when options.redirect == manual
Co-authored-by: Tasos Bitsios <tasos.bitsios@import.io>
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
2021-11-26 11:19:25 +01:00
Dmitry Merkulov
2d5399ed56
fix: handle errors from the request body stream ( #1392 )
...
* fix: handle errors from the request body stream
* lint: fix linting
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
2021-11-19 14:40:51 +01:00
Jimmy Wärting
0284826de6
fix(http.request): Cast URL to string before sending it to NodeJS core ( #1378 )
...
* Add some jsdoc
* cast url to string before sending it to NodeJS core
2021-11-12 12:37:51 +01:00
Jimmy Wärting
3f0e0c2949
docs: Fix typo around sending a file ( #1381 )
2021-11-12 12:31:29 +01:00
Jimmy Wärting
30c3cfe1d2
update fetch-blob ( #1371 )
2021-11-10 16:46:19 +01:00
Jimmy Wärting
109bd21313
release minor change (3.1.0) ( #1364 )
2021-11-08 19:13:47 +01:00
Jimmy Wärting
ff71348b7b
docs: Update code examples ( #1365 )
...
* remove buffer example
* show example of posting and getting a formdata instance
* recommend using builtin AbortController
* recommend posting blob instead of stream
* we do support formdata
2021-11-08 19:09:18 +01:00
Jimmy Wärting
1068c8a56e
template: Make PR template more task oriented ( #1224 )
2021-11-08 13:11:04 +01:00
Jimmy Wärting
3944f24770
feat(Body): Added support for `BodyMixin.formData()` and constructing bodies with FormData ( #1314 )
...
Added support for body toFormData
2021-11-08 12:51:49 +01:00
Ambrose Chua
37ac459cfd
docs: Improve clarity of "Loading and configuring" ( #1323 )
...
* docs: Improve clarity of "Loading and configuring"
* Update README.md
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
2021-11-05 13:33:22 +01:00
Jiralite
a3a5b6316e
chore: Correct stuff in README.md ( #1361 )
2021-11-05 13:20:21 +01:00
Clemens Wolff
ff7e950359
Add typing for Response.redirect(url, status) ( #1169 )
2021-11-05 11:31:14 +01:00
Travis D. Warlick, Jr
2d80b0bb3f
Add support for Referrer and Referrer Policy ( #1057 )
...
* Support referrer and referrerPolicy
* Test TS types for addition of referrer and referrerPolicy
* Fix lint issues and merge error
2021-11-05 10:26:13 +01:00
dependabot[bot]
0a672754ce
Bump mocha from 8.4.0 to 9.1.3 ( #1339 )
...
Bumps [mocha](https://github.com/mochajs/mocha ) from 8.4.0 to 9.1.3.
- [Release notes](https://github.com/mochajs/mocha/releases )
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mochajs/mocha/compare/v8.4.0...v9.1.3 )
---
updated-dependencies:
- dependency-name: mocha
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-04 22:33:53 +01:00
dependabot[bot]
300eb56732
Bump data-uri-to-buffer from 3.0.1 to 4.0.0 ( #1319 )
...
Bumps [data-uri-to-buffer](https://github.com/TooTallNate/node-data-uri-to-buffer ) from 3.0.1 to 4.0.0.
- [Release notes](https://github.com/TooTallNate/node-data-uri-to-buffer/releases )
- [Commits](https://github.com/TooTallNate/node-data-uri-to-buffer/compare/3.0.1...4.0.0 )
---
updated-dependencies:
- dependency-name: data-uri-to-buffer
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-27 12:13:38 +02:00
dnalborczyk
47d9cde0b0
refactor: use node: prefix for imports ( #1346 )
...
* refactor: use node: prefix for imports
2021-10-26 11:06:52 +02:00
dnalborczyk
96f9ae27c9
chore: fix lint ( #1348 )
2021-10-23 12:49:37 +02:00
dnalborczyk
965b323d9c
fix(types): declare buffer() deprecated ( #1345 )
2021-10-23 11:15:24 +02:00