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:
Pete Holiday
2017-01-12 03:17:17 -05:00
committed by wing328
parent d7eeb069f2
commit 2e4de0ca1e
15 changed files with 533 additions and 6 deletions

View File

@@ -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);