Crates.io | ureq_multipart |
lib.rs | ureq_multipart |
version | 1.1.1 |
source | src |
created_at | 2023-01-30 00:23:13.249484 |
updated_at | 2023-02-06 04:39:34.244997 |
description | ureq multipart post toolkit |
homepage | |
repository | https://gitee.com/eshangrao/ureq-multipart-toolkit |
max_upload_size | |
id | 771299 |
size | 8,941 |
a ureq http multipart post toolkit。
fork from multipart
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()?
use ureq_multipart::MultipartRequest;
let resp: Value = ureq::post("http://some.service.url")
.send_multipart_file("name","&/home/feiy/Desktop/1.txt")?
.into_json()?