forked from loafle/openapi-generator-original
Remove unnecessary call to setHost() in the constructor (#4525)
* Remove unnecessary call to setHost() in the constructor The default host will be automatically set on the client by the ApiClient constructor. * Updated PHP API Classes corresponding to template updates in #4525. * Additional changes generated by the petstore update unrelated to #4525, but seem to have not been included yet. * Add test to prevent regressions of #4525
This commit is contained in:
@@ -163,6 +163,11 @@ class ApiClient
|
||||
if ($this->config->getCurlTimeout() !== 0) {
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT, $this->config->getCurlTimeout());
|
||||
}
|
||||
// set connect timeout, if needed
|
||||
if ($this->config->getCurlConnectTimeout() != 0) {
|
||||
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $this->config->getCurlConnectTimeout());
|
||||
}
|
||||
|
||||
// return the result on success, rather than just true
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user