#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

#998 in Encoding

Download history 2249/week @ 2024-11-18 2387/week @ 2024-11-25 2434/week @ 2024-12-02 3211/week @ 2024-12-09 4410/week @ 2024-12-16 1219/week @ 2024-12-23 1822/week @ 2024-12-30 4255/week @ 2025-01-06 4209/week @ 2025-01-13 4499/week @ 2025-01-20 4659/week @ 2025-01-27 4058/week @ 2025-02-03 4437/week @ 2025-02-10 5293/week @ 2025-02-17 5015/week @ 2025-02-24 5529/week @ 2025-03-03

20,287 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