aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-01-25 22:38:06 +0100
committerMartin Fischer <martin@push-f.com>2021-01-25 22:50:40 +0100
commit3fd065757f02ebf1d055912e6809fac15c8bf058 (patch)
treef09e640f5c46111f5d63b68e5ec91bfbaee57541 /README.md
parente04c832200f38ab49ce8e7a6d08ffc549b8a98e2 (diff)
reintroduce CsrfToken typev0.3.3
Raw HTML is potentially dangerous so it's better to provide an encapsulating type instead of relying on naked strings. bump version to 0.3.3
Diffstat (limited to 'README.md')
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.md b/README.md
index 9892e21..4ee6456 100644
--- a/README.md
+++ b/README.md
@@ -59,7 +59,7 @@ async fn route(req: &mut Parts, body: Body) -> Result<Response, Error> {
fn get_form(req: &mut Parts) -> Response {
let mut response = Builder::new();
- let csrf_input = req.csrf_html_input(&mut response);
+ let csrf_input = req.csrf_token(&mut response).html_input();
response.content_type(mime::TEXT_HTML).body(
format!("<form method=post>
<input name=text>{}<button>Submit</button></form>", csrf_input).into()