Skip to content

Commit 44d0fa2

Browse files
authored
Merge pull request #9 from privy-io/arlyon/client-version
2 parents 6ffa0d1 + 9276bd2 commit 44d0fa2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/client.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,18 @@ impl PrivyClient {
4343
app_secret: String,
4444
url: &str,
4545
) -> Result<Self, PrivyCreateError> {
46+
let client_version = concat!("rust:", env!("CARGO_PKG_VERSION"));
47+
48+
tracing::debug!("Privy client version: {}", client_version);
49+
4650
let mut headers = reqwest::header::HeaderMap::new();
4751
headers.insert(
4852
reqwest::header::AUTHORIZATION,
4953
HeaderValue::from_str(&get_auth_header(&app_id, &app_secret))?,
5054
);
5155
headers.insert("privy-app-id", HeaderValue::from_str(&app_id)?);
5256
headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/json"));
53-
headers.insert("privy-client", HeaderValue::from_static("rust-sdk"));
57+
headers.insert("privy-client", HeaderValue::from_static(client_version));
5458

5559
let client_with_custom_defaults = reqwest::ClientBuilder::new()
5660
.connect_timeout(Duration::from_secs(15))

0 commit comments

Comments
 (0)