#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

#982 in Encoding

Download history 1825/week @ 2024-09-25 1166/week @ 2024-10-02 1019/week @ 2024-10-09 1861/week @ 2024-10-16 2277/week @ 2024-10-23 1919/week @ 2024-10-30 2039/week @ 2024-11-06 2013/week @ 2024-11-13 2371/week @ 2024-11-20 2336/week @ 2024-11-27 2731/week @ 2024-12-04 3274/week @ 2024-12-11 3797/week @ 2024-12-18 1140/week @ 2024-12-25 2850/week @ 2025-01-01 3235/week @ 2025-01-08

11,732 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

~555KB