https://github.com/iliana/form-data-builder
Simple multipart/form-data (RFC 7578) document builder
https://github.com/iliana/form-data-builder
Last synced: 5 months ago
JSON representation
Simple multipart/form-data (RFC 7578) document builder
- Host: GitHub
- URL: https://github.com/iliana/form-data-builder
- Owner: iliana
- License: mit-0
- Created: 2022-06-01T04:57:28.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-05T20:46:54.000Z (about 3 years ago)
- Last Synced: 2025-01-01T07:48:19.826Z (5 months ago)
- Language: Rust
- Homepage: https://docs.rs/form-data-builder
- Size: 43.9 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# form-data-builder
This is a simple `multipart/form-data` ([RFC 7578][rfc7578]) document builder.
```rust
use form_data_builder::FormData;let mut form = FormData::new(Vec::new()); // use a Vec as a writer
form.content_type_header(); // add this `Content-Type` header to your HTTP requestform.write_path("ferris", "testdata/rustacean-flat-noshadow.png", "image/png")?;
form.write_field("cute", "yes")?;
form.finish(); // returns the writer
```Looking for a feature-packed, asynchronous, robust, and well-tested `multipart/form-data`
library that validates things like content types? We hope you find one somewhere![rfc7578]: https://www.rfc-editor.org/rfc/rfc7578.html
License: MIT-0