#multipart-form #builder #document #rfc-7578 #validation #form-data

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

#1367 in Encoding

Download history 5315/week @ 2025-03-11 6594/week @ 2025-03-18 4876/week @ 2025-03-25 10468/week @ 2025-04-01 18900/week @ 2025-04-08 34042/week @ 2025-04-15 43455/week @ 2025-04-22 22341/week @ 2025-04-29 10091/week @ 2025-05-06 12748/week @ 2025-05-13 13682/week @ 2025-05-20 10546/week @ 2025-05-27 10823/week @ 2025-06-03 15353/week @ 2025-06-10 13613/week @ 2025-06-17 14646/week @ 2025-06-24

58,813 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

~580KB