Crate ureq_multipart
source ·Expand description
ureq 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()?
Structs
multipart data build
Traits
multipart request for ureq
add send_multipart_file/send_multipart_files method to ureq Request