Description
See: digitalbazaar/jsonld.js#516 (comment)
Thanks, great analysis!
It seems that a PR to http-client could be made that did something to the internals ... like making
_createHttpClient
take a function that returned a (possibly memoized)kyPromise
rather than taking a promise directly. That would allow the original import ofky-universal
to also be moved within that function for the default case where theparent
is the original / baseky
instance:https://github.com/digitalbazaar/http-client/blob/v3.3.0/lib/httpClient.js#L35-L51
Unfortunately, it seems this would mean that the
kyPromise
exported by the library would also need to become such a function, which would be a breaking change. Maybe we can figure out a way around that -- but even if we can't, a major version could be released that avoids the problem you identified.Any further discussion that relates to http-client specifically should be taken over here: digitalbazaar/http-client#34