Update README.md

This commit is contained in:
Rob Wagner 2023-10-23 23:58:41 -04:00
parent c85fc831f3
commit 35aa41f5ba
No known key found for this signature in database
GPG key ID: 53CCB4497B15CF61

View file

@ -18,6 +18,22 @@
const values for all of the htmx headers, so there's no need to mess with const values for all of the htmx headers, so there's no need to mess with
strings in your handlers. strings in your handlers.
## Table of Contents
- [axum-htmx](#axum-htmx)
- [Table of Contents](#table-of-contents)
- [Getting Started](#getting-started)
- [Extractors](#extractors)
- [Responders](#responders)
- [Request Guards](#request-guards)
- [Examples](#examples)
- [Example: Extractors](#example-extractors)
- [Example: Responders](#example-responders)
- [Example: Router Guard](#example-router-guard)
- [Feature Flags](#feature-flags)
- [Contributing](#contributing)
- [License](#license)
## Getting Started ## Getting Started
Simply run `cargo add axum-htmx` to add the library to your project. Simply run `cargo add axum-htmx` to add the library to your project.
@ -86,6 +102,8 @@ trivially set the `HX-Request` header themselves. This is merely a convenience
for preventing users from receiving partial responses without context. If you for preventing users from receiving partial responses without context. If you
need to secure an endpoint you should be using a proper auth system._ need to secure an endpoint you should be using a proper auth system._
## Examples
### Example: Extractors ### Example: Extractors
In this example, we'll look for the `HX-Boosted` header, which is set when In this example, we'll look for the `HX-Boosted` header, which is set when
@ -175,7 +193,7 @@ fn router_two() -> Router {
} }
``` ```
### Feature Flags ## Feature Flags
<!-- markdownlint-disable --> <!-- markdownlint-disable -->
| Flag | Default | Description | Dependencies | | Flag | Default | Description | Dependencies |