[][src]Crate actix_multipart_rfc7578

This crate contains an implementation of the multipart/form-data media type described in RFC 7578 for actix-web.

Usage

Declare the dependency:

[dependencies]
actix-multipart-rfc7578 = "0.1.0"

Import the crate:

extern crate actix_multipart_rfc7578 as multipart;

Example:

use futures::Future;
use actix_multipart_rfc7578::client::{self, multipart};

let mut form = multipart::Form::default();

form.add_text("test", "Hello World");

actix_web::actix::run(|| {
    actix_web::client::get("http://localhost/upload")
        .streaming(multipart::Body::from(form))
        .unwrap()
        .send()
        .map(|_| println!("done..."))
        .map_err(|_| println!("an error occurred"))
        .then(|_| { actix_web::actix::System::current().stop(); Ok(()) })
});

Modules

client