Update README.md

This commit is contained in:
Rob Wagner 2023-12-03 15:55:56 -05:00
parent 035c9c0e5e
commit 9d559d0041
No known key found for this signature in database
GPG key ID: 53CCB4497B15CF61

View file

@ -13,10 +13,8 @@
<!-- markdownlint-enable --> <!-- markdownlint-enable -->
`axum-htmx` is a small extension library providing extractors, responders, and `axum-htmx` is a small extension library providing extractors, responders, and
request guards for all [htmx](https://htmx.org/) headers within request guards for [htmx](https://htmx.org/) headers within
[axum](https://github.com/tokio-rs/axum). Additionally, the library exports [axum](https://github.com/tokio-rs/axum).
const values for all of the htmx headers, so there's no need to mess with
strings in your handlers.
## Table of Contents ## Table of Contents
@ -36,7 +34,7 @@
## Getting Started ## Getting Started
Simply run `cargo add axum-htmx` to add the library to your project. Run `cargo add axum-htmx` to add the library to your project.
## Extractors ## Extractors
@ -140,8 +138,8 @@ async fn index() -> (&'static str, HxResponseTrigger) {
} }
``` ```
`htmx` also allows arbitrary data to be sent along with the event, which we `htmx` also allows arbitrary data to be sent along with the event, which we can
can use via the `serde` feature flag and the `HxEvent` type. use via the `serde` feature flag and the `HxEvent` type.
```rust ```rust
use serde_json::json; use serde_json::json;