httpClient()->getCredential(); } $timeout = isset($this->options['timeout']) ? $this->options['timeout'] : Request::TIMEOUT; $connectTimeout = isset($this->options['connect_timeout']) ? $this->options['connect_timeout'] : Request::CONNECT_TIMEOUT; return $this->httpClient()->getSessionCredential($timeout, $connectTimeout); } /** * Get the client based on the request's settings. * * @return Client * @throws ClientException */ public function httpClient() { if (!AlibabaCloud::all()) { if (CredentialsProvider::hasCustomChain()) { CredentialsProvider::customProvider($this->client); } else { CredentialsProvider::defaultProvider($this->client); } } return AlibabaCloud::get($this->client); } /** * Merged with the client's options, the same name will be overwritten. * * @throws ClientException */ public function mergeOptionsIntoClient() { $this->options = \AlibabaCloud\Client\arrayMerge( [ $this->httpClient()->options, $this->options, ] ); } }