forked from loafle/openapi-generator-original
fix default header
This commit is contained in:
parent
8d708c2442
commit
f357f4c9d7
@ -182,14 +182,11 @@ 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";
|
||||
}
|
||||
}
|
||||
|
||||
// form data
|
||||
if ($postData and in_array('Content-Type: application/x-www-form-urlencoded', $headers)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user