Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create body extractor function #561

Merged
merged 2 commits into from
Feb 14, 2025
Merged

Conversation

Valerioageno
Copy link
Member

@Valerioageno Valerioageno commented Feb 13, 2025

Checklist

Related issue

Fixes #538

Overview

Usage

#[derive(Deserialize)]
struct MyBody {
   pub field: u8
}

#[tuono_lib::api(POST)]
async fn my_post_request(req: Request) -> impl IntoResponse {
    let body = req.body::<MyBody>().unwrap();
}
  • Finish to do the tests

@github-actions github-actions bot added the rust Requires rust knowledge label Feb 13, 2025
@Valerioageno Valerioageno marked this pull request as ready for review February 14, 2025 16:39
@Valerioageno Valerioageno merged commit e3b1c0e into main Feb 14, 2025
21 checks passed
@Valerioageno Valerioageno deleted the add-post-body-extractor branch February 14, 2025 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Requires rust knowledge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request]: add body to POST request
1 participant