#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

#992 in Encoding

Download history 1183/week @ 2024-03-14 1345/week @ 2024-03-21 1403/week @ 2024-03-28 1798/week @ 2024-04-04 1484/week @ 2024-04-11 1365/week @ 2024-04-18 1543/week @ 2024-04-25 1377/week @ 2024-05-02 1449/week @ 2024-05-09 1203/week @ 2024-05-16 1529/week @ 2024-05-23 1247/week @ 2024-05-30 1191/week @ 2024-06-06 1573/week @ 2024-06-13 2305/week @ 2024-06-20 4419/week @ 2024-06-27

9,694 downloads per month
Used in 2 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

~545KB