Skip to content

feat: form bodies (urlencoded + multipart) with read_form_body (#47) - #59

Merged
ZhuchkaTriplesix merged 3 commits into
devfrom
issue-47-form-bodies
Apr 26, 2026
Merged

ZhuchkaTriplesix merged 3 commits into
devfrom
issue-47-form-bodies

Conversation

@ZhuchkaTriplesix

@ZhuchkaTriplesix ZhuchkaTriplesix commented Apr 26, 2026 •

Copy link
Copy Markdown
Member
  • Route flag read_form_body; inject form (dict) and files (list of part dicts)
  • Parse with form_urlencoded crate and multer; 400/415 on bad input; 413 when body exceeds OXYROUTE_MAX_BODY_BYTES (default 8 MiB; 0 disables)
  • Mutual exclusion with read_json_body in Rust and app._route
  • Tests: httpx ASGI urlencoded, multipart upload, oversize 413
  • docs/handlers.md + feature.md; PRIORITIES marks feat: multipart/form-data and urlencoded request bodies #47 done

Closes #47

Summary

  • What this PR does (1–3 sentences).
  • If it closes a ticket: Closes #N (replace N).

Base branch

  • This PR targets dev, not main (unless maintainers asked for a hotfix).

Checklist

  • cargo build (and cargo clippy if you touched Rust)
  • maturin develop + tests as in docs/development.md (e.g. pytest from a clean cwd / installed wheel)
  • No unrelated drive-by refactors; commits are atomic and scoped

Note on .github/ISSUE_BACKLOG/

If you only touch issue template files under .github/ISSUE_BACKLOG/ (not application code), say so in the summary. Prefer a separate PR for backlog-only edits when possible.

- Route flag read_form_body; inject form (dict) and files (list of part dicts)
- Parse with form_urlencoded crate and multer; 400/415 on bad input; 413 when
  body exceeds OXYROUTE_MAX_BODY_BYTES (default 8 MiB; 0 disables)
- Mutual exclusion with read_json_body in Rust and app._route
- Tests: httpx ASGI urlencoded, multipart upload, oversize 413
- docs/handlers.md + feature.md; PRIORITIES marks #47 done

Closes #47
@ZhuchkaTriplesix ZhuchkaTriplesix added this to the v0.2.0 milestone Apr 26, 2026
@ZhuchkaTriplesix ZhuchkaTriplesix self-assigned this Apr 26, 2026

@ZhuchkaTriplesix ZhuchkaTriplesix left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

123

@ZhuchkaTriplesix ZhuchkaTriplesix linked an issue Apr 26, 2026 that may be closed by this pull request

@ZhuchkaTriplesix ZhuchkaTriplesix left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

123

@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 1aea9b2 into dev Apr 26, 2026
16 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue-47-form-bodies branch April 27, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: multipart/form-data and urlencoded request bodies

1 participant