private function setDefaultUserAgent()
    {
        // Add the default user-agent header.
        if (! isset($this->configs['headers'])) {
            $this->configs['headers'] = ['User-Agent' => $this->getDefaultUserAgent()];
        } else {
            // Add the User-Agent header if one was not already set.
            foreach (array_keys($this->configs['headers']) as $name) {
                if (strtolower($name) === 'user-agent') {
                    return;
                }
            }
            $this->configs['headers']['User-Agent'] = $this->getDefaultUserAgent();
        }
    }