#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

#1063 in Encoding

Download history 1066/week @ 2023-12-18 491/week @ 2023-12-25 841/week @ 2024-01-01 861/week @ 2024-01-08 765/week @ 2024-01-15 939/week @ 2024-01-22 863/week @ 2024-01-29 660/week @ 2024-02-05 965/week @ 2024-02-12 698/week @ 2024-02-19 1189/week @ 2024-02-26 1342/week @ 2024-03-04 1031/week @ 2024-03-11 1355/week @ 2024-03-18 1459/week @ 2024-03-25 1363/week @ 2024-04-01

5,239 downloads per month
Used in neocities-client

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

~550KB