Skip to content

Commit 05cc281

Browse files
author
Sebastian Machuca
authored
Merge pull request #275 from icatalina/add-user-agent
fix(curl): Add CURLOPT_USERAGENT to all requests
2 parents 7750e08 + aa91874 commit 05cc281

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Bigcommerce/Api/Connection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public function __construct()
9797
$this->curl = curl_init();
9898
curl_setopt($this->curl, CURLOPT_HEADERFUNCTION, [$this, 'parseHeader']);
9999
curl_setopt($this->curl, CURLOPT_WRITEFUNCTION, [$this, 'parseBody']);
100+
curl_setopt($this->curl, CURLOPT_USERAGENT, 'PHP CURL - Bigcommerce API Client');
100101

101102
// 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
102103
curl_setopt($this->curl, CURLOPT_ENCODING, '');

0 commit comments

Comments
 (0)