Skip to content

Commit

Permalink
Fix [run ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
50U10FCA7 committed Jan 9, 2025
1 parent a665e77 commit 289ac68
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type HyperConnector = HttpsConnector<HttpConnector>;
pub enum Endpoint {
/// Custom endpoint [`Uri`].
///
/// [`Uri::path`] should not contain trailing `/`.
/// [`Uri::path`] should contain trailing `/`.
Custom(Uri),

/// The production environment (`https://api.push.apple.com`).
Expand All @@ -49,8 +49,8 @@ impl fmt::Display for Endpoint {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Endpoint::Custom(uri) => write!(f, "{uri}"),
Endpoint::Production => write!(f, "https://api.push.apple.com"),
Endpoint::Sandbox => write!(f, "https://api.development.push.apple.com"),
Endpoint::Production => write!(f, "https://api.push.apple.com/"),
Endpoint::Sandbox => write!(f, "https://api.development.push.apple.com/"),
}
}
}
Expand Down Expand Up @@ -267,10 +267,10 @@ impl Client {
}

fn build_request<T: PayloadLike>(&self, payload: T) -> Result<hyper::Request<BoxBody<Bytes, Infallible>>, Error> {
let path = format!("{}/3/device/{}", self.options.endpoint, payload.get_device_token());
let uri = format!("{}3/device/{}", self.options.endpoint, payload.get_device_token());

let mut builder = hyper::Request::builder()
.uri(&path)
.uri(&uri)
.method("POST")
.header(CONTENT_TYPE, "application/json");

Expand Down

0 comments on commit 289ac68

Please sign in to comment.