Skip to content

Commit

Permalink
Merge pull request #6 from purduehackers/request-fix
Browse files Browse the repository at this point in the history
More fix
  • Loading branch information
ImTheSquid authored Dec 6, 2024
2 parents d7e8ca6 + 227b568 commit 3aed111
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sign-firmware"
version = "0.1.6"
version = "0.1.7"
authors = ["Jack Hogan <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand Down
4 changes: 4 additions & 0 deletions src/printer.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use esp_idf_svc::io::asynch::Write;
use http::Request;

use crate::{
Expand Down Expand Up @@ -73,6 +74,7 @@ pub async fn post_event(event: PrinterEvent) -> anyhow::Result<()> {
.method("POST")
.header("User-Agent", "PHSign/1.0.0")
.header("Content-Type", "application/json")
.header("Host", "api.purduehackers.com")
.uri(url)
.body(serde_json::to_string(&event.message())?)
.unwrap();
Expand All @@ -83,5 +85,7 @@ pub async fn post_event(event: PrinterEvent) -> anyhow::Result<()> {
.await
.map_err(convert_error)?;

tls.flush().await?;

Ok(())
}

0 comments on commit 3aed111

Please sign in to comment.