Skip to content

Commit

Permalink
Otherwise -p always gives Hello world!
Browse files Browse the repository at this point in the history
  • Loading branch information
phocks committed Feb 6, 2024
1 parent fb09331 commit 6d37cd3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/simple_send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>

if let Some(ref payload) = push_payload {
builder.set_payload(ece_scheme, payload.as_bytes());
} else {
builder.set_payload(ece_scheme, "Hello world!".as_bytes());
}

if let Some(time) = ttl {
Expand All @@ -76,7 +78,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>
let signature = sig_builder.build().unwrap();

builder.set_vapid_signature(signature);
builder.set_payload(ContentEncoding::Aes128Gcm, "test".as_bytes());
};

let client = IsahcWebPushClient::new()?;
Expand Down

0 comments on commit 6d37cd3

Please sign in to comment.