mirror of
https://github.com/robertwayne/axum-htmx
synced 2024-11-30 15:04:32 +01:00
Update README.md
This commit is contained in:
parent
035c9c0e5e
commit
9d559d0041
1 changed files with 5 additions and 7 deletions
12
README.md
12
README.md
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue