Skip to content

Releases: robertwayne/axum-htmx

v0.6.0

24 Jun 22:16
9f18889
Compare
Choose a tag to compare

v0.6.0

  • Added support for Vary headers in responses via the VaryHxRequest, VaryHxTarget, VaryHxTrigger, and VaryHxTriggerName responders. (@imbolc)
  • Header names/values are now typed as HeaderName and HeaderValue instead of &str. (@imbolc)
  • HxError now implements source on error::Error. (@imbolc)
  • Added AutoVaryLayer middleware to automatically manage Vary headers when using corresponding extractors. The middleware is behind the auto-vary feature. See this section of the README for more details.. (@imbolc)

v0.5.0

03 Dec 21:04
29dbadc
Compare
Choose a tag to compare

v0.5.0

There are some several breaking changes in this release. Big thanks to @ItsEthra for their work in several PRs!

  • All responders now take an HxEvent instead of a String | HxEvent. When the serde flag is enabled, it will expose additional data fields.
  • HxResponseTrigger is now a simple struct containing an TriggerMode and a Vec<HxEvent>. There are several methods to make constructing these easier: HxResponseTrigger::normal, HxResponseTrigger::after_settle, and HxResponseTrigger::after_swap.
  • The HxCurrentUrl extractor now returns an Option<axum::http::Uri instead of a String. If the Uri cannot be parsed, it will return None.
  • All Uri-related responders now impl TryFrom<&str>.
  • HxError::Serialization has been renamed to HxError::Json.
  • The HxResponseTrigger* header will not be added to the response if the event list is empty.
  • Added feature flag badges and made additional updates to the docs.rs pages.
  • Reduced dependency count / compile time by swapping axum out for the
    axum-core, async-trait, and http crates.

v0.4.0

24 Oct 03:54
c85fc83
Compare
Choose a tag to compare

v0.4.0

  • Added support for all htmx response headers via a type implementing IntoResponseParts. These "responders" allow you to simply and safely apply the HX-* headers to any of your responses. Thanks to @pfz4 for the implementation work! (#5)

You can find a list of all the responders in the README and API documentation. The README also contains a couple examples on using responders.

v0.3.0

29 Jul 21:17
a753da2
Compare
Choose a tag to compare
  • HxRequestGuardLayer now redirects on failures instead of returning a 403. By default, it will redirect to "/", but you can specify a different route to redirect to with HxRequestGuardLayer::new("/your-route-here").

v0.2.0

28 Jul 02:24
86890e2
Compare
Choose a tag to compare
  • Added HxRequestGuardLayer, allowing you to protect an entire router from non-htmx requests. This can be enabled via the new feature flag guards.

v0.1.0

22 Jul 23:39
92321a9
Compare
Choose a tag to compare

Initial release.