fix default header

This commit is contained in:
wing328 2015-06-01 14:24:09 +08:00
parent 8d708c2442
commit f357f4c9d7

View File

@ -182,13 +182,10 @@ class APIClient {
$this->updateParamsForAuth($headerParams, $queryParams, $authSettings);
# construct the http header
if ($headerParams !== null) {
# add default header
$headerParams = array_merge((array)self::$default_header, $headerParams);
$headerParams = array_merge((array)self::$default_header, (array)$headerParams);
foreach ($headerParams as $key => $val) {
$headers[] = "$key: $val";
}
foreach ($headerParams as $key => $val) {
$headers[] = "$key: $val";
}
// form data