form-data-builder

Crates.ioform-data-builder
lib.rsform-data-builder
version1.0.1
sourcesrc
created_at2022-06-01 05:04:44.680612
updated_at2022-06-05 20:47:39.345002
descriptionSimple multipart/form-data (RFC 7578) document builder
homepage
repositoryhttps://github.com/iliana/form-data-builder
max_upload_size
id597885
size12,147
iliana etaoin (iliana)

documentation

README

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

Commit count: 3

cargo fmt