dhananjaysa92
c071406e19
(1138) - Fixed HTTPResponseError with correct constructor and usage ( #1666 )
...
Co-authored-by: Dhananjay Agrawal <dhananjay.agrawal@aexp.com>
2022-10-30 21:17:53 +01:00
Naresh Rawat
6f72caa401
docs: fix missing comma in example ( #1623 )
2022-08-10 14:59:10 +02:00
Khang Vo (doublevkay)
2880238729
fix: ReDoS referrer ( #1611 )
...
* fix ReDoS referrer
* Update src/utils/referrer.js
Eliminate regex and use string matcher
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
Co-authored-by: Khang. Võ Vĩ <khangvv@vng.com.vn>
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
2022-07-31 10:01:29 +02:00
Max Gerber
e87b093fd6
fix(Headers): don't forward secure headers on protocol change ( #1599 )
...
* fix(Headers): don't forward secure headers on protocol change
* fix lint
2022-07-18 17:20:30 +02:00
Mike
bcfb71c7d1
chore: remove triple-slash directives from typings ( #1285 ) ( #1287 )
2022-07-13 20:39:44 +02:00
Moni
95165d5480
fix spelling ( #1602 )
2022-07-13 20:36:00 +02:00
Khafra
11b7033611
fix: possibly flaky test ( #1523 )
2022-07-12 18:31:49 +02:00
三咲智子
4f43c9ed63
fix: always warn Request.data ( #1550 )
2022-07-12 00:45:16 +02:00
Krisi Ves
1c5ed6b981
fix: undefined reference to response.body when aborted ( #1578 )
2022-06-09 10:55:02 +00:00
Tom
a92b5d5cf4
fix: use space in accept-encoding values ( #1572 )
...
* fix for issue #1571
* Update README.md
Co-authored-by: Jimmy Wärting <jimmy@warting.se>
2022-06-01 21:43:48 +02:00
Jimmy Wärting
0f122b8824
docs: fix formdata code example ( #1562 )
2022-05-27 14:31:17 -07:00
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