feat: Add LICENSE file and refactor MITM response handling and tracing.
This commit is contained in:
@@ -100,7 +100,14 @@ fn curl_get(path: &str) -> Option<String> {
|
||||
fn curl_post(path: &str, body: &str) -> Option<String> {
|
||||
let url = format!("{}{}", base_url(), path);
|
||||
Command::new("curl")
|
||||
.args(["-sf", &url, "-H", "Content-Type: application/json", "-d", body])
|
||||
.args([
|
||||
"-sf",
|
||||
&url,
|
||||
"-H",
|
||||
"Content-Type: application/json",
|
||||
"-d",
|
||||
body,
|
||||
])
|
||||
.output()
|
||||
.ok()
|
||||
.filter(|o| o.status.success())
|
||||
@@ -188,7 +195,9 @@ fn do_status() {
|
||||
let text = String::from_utf8_lossy(&o.stdout);
|
||||
// Print first 6 lines
|
||||
for (i, line) in text.lines().enumerate() {
|
||||
if i >= 6 { break; }
|
||||
if i >= 6 {
|
||||
break;
|
||||
}
|
||||
println!("{line}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user