Skip to content

Commit

Permalink
Add default user agent string to requests in UrlClient (#2271)
Browse files Browse the repository at this point in the history
  • Loading branch information
matteblair authored Jul 6, 2021
1 parent 2888511 commit 818a3c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions platforms/common/urlClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ struct UrlClient::Task {
curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(handle, CURLOPT_MAXREDIRS, 20);
curl_easy_setopt(handle, CURLOPT_TCP_NODELAY, 1);
curl_easy_setopt(handle, CURLOPT_USERAGENT, _options.userAgentString);
}

void setup() {
Expand Down
1 change: 1 addition & 0 deletions platforms/common/urlClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class UrlClient {
uint32_t maxActiveTasks = 20;
uint32_t connectionTimeoutMs = 3000;
uint32_t requestTimeoutMs = 30000;
const char* userAgentString = "tangram";
};

UrlClient(Options options);
Expand Down

0 comments on commit 818a3c2

Please sign in to comment.