Skip to content

Commit 12d4ba8

Browse files
committed
Merge pull request xively#7 from frasermac/UserAgent
Added library User-Agent
2 parents 608fe99 + ee12560 commit 12d4ba8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CosmClient.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ int CosmClient::put(CosmFeed& aFeed, const char* aApiKey)
1717
if (ret == 0)
1818
{
1919
http.sendHeader("X-ApiKey", aApiKey);
20+
http.sendHeader("User-Agent", "Cosm-Arduino-Lib/1.0");
2021

2122
CountingStream countingStream; // Used to work out how long that data will be
2223
for (int i =kCalculateDataLength; i <= kSendData; i++)
@@ -78,6 +79,7 @@ int CosmClient::get(CosmFeed& aFeed, const char* aApiKey)
7879
if (ret == 0)
7980
{
8081
http.sendHeader("X-ApiKey", aApiKey);
82+
http.sendHeader("User-Agent", "Cosm-Arduino-Lib/1.0");
8183
http.endRequest();
8284

8385
ret = http.responseStatusCode();

0 commit comments

Comments
 (0)