Skip to content

Commit

Permalink
Merge pull request #36 from urbanairship/TOOLSLIBS-357-appkey-header
Browse files Browse the repository at this point in the history
[TOOLSIBS-357] Adds appkey to user agent string
  • Loading branch information
aschuman0 authored Sep 28, 2021
2 parents f0719a7 + 5a23ab6 commit 28d2d49
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Removing entire .idea directory, and supporting files
.idea/
*.iml
.vscode/

docs/_build/
data/
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
--------------------
0.4.2
--------------------
- Adds app key to the user agent string

--------------------
0.4.1
--------------------
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.1
0.4.2
2 changes: 1 addition & 1 deletion src/UrbanAirship/Airship.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public function request($method, $body, $uri, $contentType=null, $version=3, $re
->authenticateWith($this->key, $this->secret)
->body($body);

$userAgent = sprintf("%s/%s", "UAPHPLibrary", About::LIBRARY_VERSION);
$userAgent = sprintf("%s/%s %s", "UAPHPLibrary", About::LIBRARY_VERSION, $this->key);
$headers[self::USER_AGENT_KEY] = $userAgent;
$request->addHeaders($headers);

Expand Down

0 comments on commit 28d2d49

Please sign in to comment.