Skip to content

Commit 54996d8

Browse files
committed
Made charset configurable
1 parent b6ae0bd commit 54996d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/RocketCode/Shopify/api.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ public function call($userData = array(), $verifyData = TRUE)
186186
}
187187

188188
$defaults = array(
189+
'CHARSET' => 'UTF-8',
189190
'METHOD' => 'GET',
190191
'URL' => '/',
191192
'HEADERS' => array(),
@@ -206,7 +207,7 @@ public function call($userData = array(), $verifyData = TRUE)
206207

207208
// Send & accept JSON data
208209
$defaultHeaders = array();
209-
$defaultHeaders[] = 'Content-Type: application/json; charset=UTF-8';
210+
$defaultHeaders[] = 'Content-Type: application/json; charset=' . $request['CHARSET'];
210211
$defaultHeaders[] = 'Accept: application/json;';
211212
if (array_key_exists('ACCESS_TOKEN', $this->_API))
212213
{

0 commit comments

Comments
 (0)