* 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>
* 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
* 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>
* 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
* 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>
* body conversion and test
* also handle blobs
* typeof null is object
* test for blob also
* lowercase boundary are easier
* unreachable code, body should never be a blob or buffer any more.
* stream singleton
* use let
* typo
* convert blob stream into a whatwg stream
* lint fix
* update changelog
Co-authored-by: Antoni Kepinski <xxczaki@pm.me>
* fix: IPv6 literal parsing
* docs: Explain why search is overwritten
* test: Document the reason for square brackets
* docs: Mention basic auth support as a difference
* fix: Raise a TypeError when URL includes credentials
* Fix redirect failing when response is chunked but empty. #1220#1064
* Handle chunked responses where the final chunk and EOM code are in separate packets and where there is an additional data chunk in the same packet before the final chunk and EOM code.
* Use ESM import in runkit example file
* Update dependencies, version and transition to ESM
* Use ESM imports, add ESM-related info
* Remove rollup
* Lint TypeScript-related files
* Update dependency
* Lint & update dependency
* Lint
* Remove commonjs tests
* chore: update changelog
* Remove commonjs GitHub action
* Update funding.yml
* Update linter rules
* Lint
* Fix tsd
* Remove unnecessary types
* Simplify
* Use top-level await
* Update GitHub Actions
* Use Mocha with ESM
* Revamp
* specify what node version
* update formdata-node dep
* remove lint from example using top await
* updated name and link to formdata-polyfill
* Stop recommend form-data
* filter example - it has many duplicate variables
* Update type definitions to ESM
* Remove unused lint rule disable comment
* Remove leftover rollup and dist folder
* updated depn
* updated d.ts
* lint
* Fix breaking changes with blob v3 stream()
* revert eslint comment
* revert back to xo 0.39
Don't want to deal with all those new rules right now. will fix it later
fixed some of them...
* none TS fan trying to fix type definition
* Give me a break
* Test on all minimum supported Node.js versions (#1170)
* Test on all minimum supported Node.js versions
* Tweak Node.js workaround version range
* Handle Node.js 16 aborted error message
* fix node version string compare
Co-authored-by: Jimmy Wärting <jimmy@warting.se>
* bumped fetch-blob version
* import from dom lib
* rm unused comment
* updated required version in docs
* fixed named import
* set lowest support to 12.20.0
* comment explaining both
* rm log
Co-authored-by: Jimmy Wärting <jimmy@warting.se>
Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
* Improve Header's forEach method compliance with browser implementation.
* Replaced callback.call with Reflect.apply on Headers' forEach.
* Set undefined as default value for Header' forEach second argument.
* Rewrote test case where 'this' is undefined.
* Ignored lint issues (no-eq-null and eqeqeq).
The stream.finished function is used consolidate the terminal cases.
The writable option must be set to false, since the body stream is
a Duplex stream, but our terminal cases only apply to the Readable side.