v6.0.0-alpha.0
Pre-release
Pre-release
- Big BC-breaking rewrite. Changes are numerous, but the important ones are
listed here. Resource.get()
now returns aState
object instead of just a response
body. This object has methods to make it easier to manipulate and get
information about the response, including links. It's also a stable,
non-async object.Ketting
class is now calledClient
. It's still exposed asKetting
as well for BC purposes.Client.getResource()
has been removed. UseClient.go()
instead.- A HTTP Fetch middleware system has been added, for easier manipulation of
requests and responses. Middlewares can be added for every request, or
for specific origins (domains). - All authentication settings have been removed, and reimplemented as
fetch middlewares. They take roughly the same options, but the setup
has changed. Resource.get()
,Resource.put()
, etc. can now all take custom headers
and other options to manipulate the request.- In the past you could just send a body with
Resource.post()
,.put()
,
.patch()
. Now this body must be a wrapped in an object with at least a.body
property. This is an annoying BC break but will allow for more flexibility
that was previous impossible. - Proper support for 'binary' resources.
- Hal Links will now be reserialized on
put()
. Resource.link
,Resource.links
andResource.hasLink
has been deprecated,
but not removed.Link
objects are now a simple typescript type, and no longer implemented
as a class.FollowerOne
is nowFollowPromiseOne
andFollowerMany
is now
FollowPromiseMany
.- All things called
Representor
has been removed, and rewritten with
a completely new API. AHAL representor
is now aHalState
. - #175: Nested embedded items are now also placed in the cache.