mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-23 09:51:28 +01:00
Handle "no body" case
This commit is contained in:
@@ -136,9 +136,9 @@ async fn send_request(
|
||||
Method::from_bytes(req.method.to_uppercase().as_bytes()).expect("Failed to create method");
|
||||
let builder = client.request(m, url_string.to_string()).headers(headers);
|
||||
|
||||
let sendable_req_result = match req.body {
|
||||
Some(b) => builder.body(b).build(),
|
||||
None => builder.build(),
|
||||
let sendable_req_result = match (req.body, req.body_type) {
|
||||
(Some(b), Some(_)) => builder.body(b).build(),
|
||||
_ => builder.build(),
|
||||
};
|
||||
|
||||
let sendable_req = match sendable_req_result {
|
||||
|
||||
Reference in New Issue
Block a user