Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
1.3.0 - 2020-10-13
Added
- The
:log
argument to the:trace
option. Add atrace: :log
option to your module'suse
statement, and every request will be logged with a trace. The log message even includes a request ID fromPlug.RequestId
, if you have one. (#4) - The
:decision_tree_overrides
argument toLiberator.Resource
. This is an advanced feature that lets users override parts of the decision tree that Liberator evaluates. Want to change the ordering of some decisions, or add new ones? This is the way! (#5) - The
:handler_status_overrides
argument toLiberator.Resource
. This is an advanced feature that lets users override status codes associated with handlers. It's mostly useful for those wanting to implement their own new statuses that Liberator doesn't support. - The
:action_followup_overrides
argument toLiberator.Resource
. This is an advanced feature that lets users override the functions called immediately after actions. It's mostly useful for those wanting to implement their own new actions that Liberator doesn't support.
1.2.0 - 2020-10-12
Added
- The
402 Payment Required
status, along with related callbackspayment_required?
andhandle_payment_required/1
. - The
451 Unavailable for Legal Reasons
status, along with related callbacksunavailable_for_legal_reasons?/1
andhandle_unavailable_for_legal_reasons/1
. - The
429 Too Many Requests
status, along with related callbackstoo_many_requests?/1
andhandle_too_many_requests/1
. If you return a map containing a:retry_after
value, Liberator will use that to set aretry-after
header. - You can also return a
:retry_after
value from any other decision function, likeservice_available?/1
, ormoved_permanently?/1
, for the same effect. See MDN's docs on theretry-after
header for more information on why you'd want to do this.
Fixed
- Dates in headers are now parsed properly. (#1)
1.1.0 - 2020-10-04
Added
- This changelog!
- The
:trace
option: Addtrace: :headers
to youruse Liberator.Resource
statement to get anx-liberator-trace
header added to responses, and see the result of all decisions. - Compression options:
deflate
,gzip
, andidentity
.
Changed
- Codecs are now configurable.
Set the
:media_types
and:encodings
map in Liberator's config to add your own codecs.
Removed
Liberator.Resource
no longer callsuse Timex
, so your context is less polluted.
Fixed
- Better wildcard handling during content negotiation
- Content negotiation actually obeys q-values for priority
1.0.0 - 2020-10-02
Added
- Basic decision tree navigation