Set the default HTTP headers to add to each request created by the client
array|Collection $headers Default HTTP headers:
Overrides ClientInterface::setDefaultHeaders
public function setDefaultHeaders($headers) {
if ($headers instanceof Collection) {
$this->defaultHeaders = $headers;
}
elseif (is_array($headers)) {
$this->defaultHeaders = new Collection($headers);
}
else {
throw new InvalidArgumentException('Headers must be an array or Collection');
}
return $this;
}