#multipart-form #rfc-7578 #builder

form-data-builder

Simple multipart/form-data (RFC 7578) document builder

2 stable releases

1.0.1 Jun 5, 2022
1.0.0 Jun 1, 2022

#1098 in Encoding

Download history 1267/week @ 2024-12-26 3483/week @ 2025-01-02 4421/week @ 2025-01-09 4107/week @ 2025-01-16 4563/week @ 2025-01-23 4481/week @ 2025-01-30 3846/week @ 2025-02-06 5076/week @ 2025-02-13 5648/week @ 2025-02-20 5159/week @ 2025-02-27 5426/week @ 2025-03-06 6265/week @ 2025-03-13 6192/week @ 2025-03-20 6930/week @ 2025-03-27 13900/week @ 2025-04-03 15455/week @ 2025-04-10

43,631 downloads per month
Used in 3 crates

MIT-0 license

12KB
133 lines

form-data-builder

This is a simple multipart/form-data (RFC 7578) document builder.

use form_data_builder::FormData;

let mut form = FormData::new(Vec::new()); // use a Vec<u8> as a writer
form.content_type_header(); // add this `Content-Type` header to your HTTP request

form.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!

License: MIT-0

Dependencies

~570KB