Skip to content

Commit

Permalink
Merge pull request #275 from icatalina/add-user-agent
Browse files Browse the repository at this point in the history
fix(curl): Add CURLOPT_USERAGENT to all requests
  • Loading branch information
Sebastian Machuca authored Nov 3, 2021
2 parents 7750e08 + aa91874 commit 05cc281
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Bigcommerce/Api/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public function __construct()
$this->curl = curl_init();
curl_setopt($this->curl, CURLOPT_HEADERFUNCTION, [$this, 'parseHeader']);
curl_setopt($this->curl, CURLOPT_WRITEFUNCTION, [$this, 'parseBody']);
curl_setopt($this->curl, CURLOPT_USERAGENT, 'PHP CURL - Bigcommerce API Client');

// Set to a blank string to make cURL include all encodings it can handle (gzip, deflate, identity) in the 'Accept-Encoding' request header and respect the 'Content-Encoding' response header
curl_setopt($this->curl, CURLOPT_ENCODING, '');
Expand Down

0 comments on commit 05cc281

Please sign in to comment.