Releases: badgateway/ketting
Releases · badgateway/ketting
v6.0.0-alpha.3
Resources
implement EventEmitter, and can emitstale
,update
and
delete
events.- The 'body' property on State is now 'data'
- #141: Added
head()
function and ability to follow links just throughHEAD
methods via theLink
header. - Added a
NeverCache
andShortCache
if automatically storing everyState
object until invalidation is not desired. - When calling
put()
with a newState
object, that object will now be placed
in cache. - When refreshing,
fetch()
is now given the 'reload' cache setting, so that
refresh()
is a true Refresh, even with a browser cache. - #130: Support relative bookmark URIs when using Ketting in a browser.
- Siren was not correctly parsed.
- Add
.clone()
method to allState
object.
v6.0.0-alpha.2
State
is now exported.- #184: Added a new
postFollow()
function that takes over the role of
post()
.post()
is now intended for RPC-like operations and form
submissions.
v6.0.0-alpha.1
- Re-release. The build contained a few older files that weren't meant to be
packaged.
v6.0.0-alpha.0
- 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.
v5.2.1
v5.2.0
v5.1.2
v5.1.1
v5.1.0
- Support for the Collection+json format.
- Added a
preferTransclude()
method on the Follower objects. This
automatically adds aPrefer: tranclude="rel"
header.