#form-data #multipart-form #multipart #rfc7578

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

#997 in Encoding

Download history 2073/week @ 2024-11-01 1830/week @ 2024-11-08 2165/week @ 2024-11-15 2391/week @ 2024-11-22 2438/week @ 2024-11-29 3144/week @ 2024-12-06 4173/week @ 2024-12-13 1747/week @ 2024-12-20 1609/week @ 2024-12-27 3809/week @ 2025-01-03 4324/week @ 2025-01-10 4443/week @ 2025-01-17 4595/week @ 2025-01-24 4369/week @ 2025-01-31 3873/week @ 2025-02-07 2374/week @ 2025-02-14

16,269 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


lib.rs:

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!

Dependencies

~570KB