#query-string #string-parser

serde-querystring-actix

A query string extractor for actix-web based on serde-querystring

8 releases

0.3.0-beta.0 Aug 8, 2024
0.2.0 Feb 1, 2023
0.1.0 Dec 28, 2022
0.1.0-beta.2 Aug 15, 2022
0.0.7 Nov 22, 2020

#922 in Web programming

Download history 28/week @ 2024-06-26 38/week @ 2024-07-03 14/week @ 2024-07-10 70/week @ 2024-07-17 57/week @ 2024-07-24 21/week @ 2024-07-31 121/week @ 2024-08-07 76/week @ 2024-08-14 45/week @ 2024-08-21 14/week @ 2024-08-28 19/week @ 2024-09-04 19/week @ 2024-09-11 19/week @ 2024-09-18 26/week @ 2024-09-25 39/week @ 2024-10-02 33/week @ 2024-10-09

118 downloads per month
Used in zero4rs

MIT/Apache

105KB
2.5K SLoC

serde-querystring for actix-web

This crate provides an extractor for serde-querystring which can be used in place of the actix-web::Query extractor.

use serde::Deserialize;
use serde_querystring_actix::QueryString;

#[derive(Deserialize)]
pub struct AuthRequest {
   id: u64,
   scopes: Vec<u64>,
}

// In your handler
async fn index(QueryString(info): QueryString<AuthRequest>) -> String {
    format!("Authorization request for client with id={} and type={:?}!", info.id, info.scopes)
}

Dependencies

~14–25MB
~442K SLoC