Skip to content

Commit

Permalink
fix body
Browse files Browse the repository at this point in the history
  • Loading branch information
cn-kali-team committed Sep 20, 2024
1 parent 96b5a48 commit 86161fe
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions engine/src/request/http/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@ impl Http {
for (key, value) in self.headers.clone().into_iter() {
builder = builder.header(key, &value);
}
if let Some(body) = &self.body {
if let Ok(request) = builder.body(slinger::Body::from(input_to_byte(body))) {
requests.push_back(Request::from(request));
};
}
let body = slinger::Body::from(input_to_byte(&self.body.clone().unwrap_or_default()));
if let Ok(request) = builder.body(body) {
requests.push_back(Request::from(request));
};
}
requests
}
Expand Down

0 comments on commit 86161fe

Please sign in to comment.