Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
fMeow committed May 29, 2021
1 parent 787a5f9 commit 5714e44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/reqwest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,11 @@ async fn multipart() {

let boundary = generate_boundary();
let multipart = form.to_multipart().unwrap();
let reader = multipart_to_read(boundary.clone(), multipart).unwrap();
let (count, reader) = multipart_to_read(boundary.clone(), multipart).unwrap();

let client = Client::new(HeaderMap::new()).unwrap();
let req = Request::post("https://httpbin.org/post")
.header(http::header::CONTENT_LENGTH, count)
.header(
http::header::CONTENT_TYPE,
vec![b"multipart/form-data; boundary=".to_vec(), boundary.clone()].concat(),
Expand Down
3 changes: 2 additions & 1 deletion tests/surf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ async fn multipart() {

let boundary = generate_boundary();
let multipart = form.to_multipart().unwrap();
let reader = multipart_to_read(boundary.clone(), multipart).unwrap();
let (count, reader) = multipart_to_read(boundary.clone(), multipart).unwrap();

let client = Client::new(HeaderMap::new()).unwrap();
let req = Request::post("https://httpbin.org/post")
.header(http::header::CONTENT_LENGTH, count)
.header(
http::header::CONTENT_TYPE,
vec![b"multipart/form-data; boundary=".to_vec(), boundary.clone()].concat(),
Expand Down

0 comments on commit 5714e44

Please sign in to comment.