ureq_multipart

Crates.ioureq_multipart
lib.rsureq_multipart
version1.1.1
sourcesrc
created_at2023-01-30 00:23:13.249484
updated_at2023-02-06 04:39:34.244997
descriptionureq multipart post toolkit
homepage
repositoryhttps://gitee.com/eshangrao/ureq-multipart-toolkit
max_upload_size
id771299
size8,941
(flyInRust)

documentation

README

ureq multipart post toolkit

a ureq http multipart post toolkit。

fork from multipart

Examples 1


use ureq_multipart::MultipartBuilder;

let (content_type,data) = MultipartBuilder::new()
            .add_file("test","/home/feiy/Desktop/1.txt").unwrap()
            .add_text("name","value")
            .finish().unwrap();
let resp: Value = ureq::post("http://some.service.url")
            .set("Content-Type", &content_type)
            .send_bytes(&data)?
            .into_json()?

Examples 2


use ureq_multipart::MultipartRequest;

let resp: Value = ureq::post("http://some.service.url")
            .send_multipart_file("name","&/home/feiy/Desktop/1.txt")?
            .into_json()?

Commit count: 0

cargo fmt