@digitalbazaar/http-client
Advanced tools
Changelog
4.1.1 - 2024-02-21
undici@5
to undici@6
.
Changelog
4.0.0 - 2023-09-12
ky@1.0.1
.ky-universal
dependency. Node.js 18+ no longer requires fetch
polyfills.Changelog
3.4.1 - 2023-04-28
Changelog
3.4.0 - 2023-04-14
ky-universal
until needed.
Promise
with an import in it.import
when not needed.Changelog
3.3.0 - 2023-01-17
ky@0.33
/ky-universal@0.11
: Fixes security issues and also changes the
behavior of an empty response body when using .json()
. An empty string
will now be returned instead of throwing.Changelog
3.2.0 - 2022-05-19
agent
and httpsAgent
options.Changelog
3.1.0 - 2022-05-03
data
field and default to undefined
. Addresses issue
when a non-JSON response is receieved, a caller accesses the data
field,
and a lower level library prints out a one-time warning to use other fields.Changelog
3.0.1 - 2022-04-26
httpClient()
. If the call options use a method that
is supported as a base function helper, e.g., httpClient.get
, then it
will be treated as if that helper was called just like the previous
version of this library.Changelog
3.0.0 - 2022-04-20
BREAKING: Convert to module (ESM) internally and use conditional exports to export a directory that has an entry point for CommonJS.
Use ky@0.30
and ky-universal@0.10.1
.
BREAKING: Only specific methods and properties are proxied from ky
on httpClient
instances now. This includes the same set of functions
that were proxied in previous versions:
get
, post
, put
, push
, patch
, head
, delete
With the same caveat that these functions return a promise that resolves
to the response (just like in previous versions, but different from ky
which returns the response synchronously). This version also proxies
create
and extend
, where extend
now properly inherits options from
the parent ky
instance. The stop
property is also proxied, but returns
a promise that resolves to the ky.stop
signal. This change was made because
the latest version of ky
is ESM-only -- and to continue supporting a CJS
build, it meant importing the library dynamically. Therefore, the ky
instance must settle before it can be used -- requiring all httpClient
methods and accessors to be asynchronous.