#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

#1008 in Encoding

Download history 1716/week @ 2024-07-26 2100/week @ 2024-08-02 1668/week @ 2024-08-09 1117/week @ 2024-08-16 1873/week @ 2024-08-23 1834/week @ 2024-08-30 1699/week @ 2024-09-06 2406/week @ 2024-09-13 1925/week @ 2024-09-20 1688/week @ 2024-09-27 891/week @ 2024-10-04 1252/week @ 2024-10-11 2344/week @ 2024-10-18 1957/week @ 2024-10-25 2073/week @ 2024-11-01 1823/week @ 2024-11-08

8,492 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

~550KB