Skip to content

Commit

Permalink
stash
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmindlin committed Aug 7, 2024
1 parent 55b563d commit d5446cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scout-worker/src/http/sender.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use reqwest::Method;
use tracing::info;

use crate::config::OutputMethods;

Expand All @@ -23,13 +24,14 @@ impl Sender {
}

pub async fn send(&self, payload: &str) -> Result<(), reqwest::Error> {
info!("sending output to {} {}", self.method, self.endpoint);
let req = self
.client
.request(self.method.clone(), &self.endpoint)
.body(payload.to_owned())
.build()?;
self.client.execute(req).await?;

let res = self.client.execute(req).await?;
info!("received response code {}", res.status());
Ok(())
}
}

0 comments on commit d5446cd

Please sign in to comment.