public function setHeader($key, $value = null, $preserveCase = false)
	{
		if ($value === null) {
			list($key, $value) = explode(':', $value, 2);
		}

		if (!$preserveCase) {
			$key = strtolower($key);
		}
		
		$key = trim($key);
		$this->headers[$key] = trim($value);

		return $this;
	}
public function setHeader($key, $value = null, $preserveCase = false)
	{
		if ($value === null) {
			list($key, $value) = explode(':', $value, 2);
		}

		if (!$preserveCase) {
			$key = strtolower($key);
		}
		
		$key = trim($key);
		$this->headers[$key] = trim($value);

		return $this;
	}
public function setHeader ( $ key , $ value = null , $ preserveCase = false ) { if ( $ value === null ) { list ( $ key , $ value ) = explode ( ':' , $ value , 2 ) ; } if ( ! $ preserveCase ) { $ key = strtolower ( $ key ) ; } $ key = trim ( $ key ) ; $ this -> headers [ $ key ] = trim ( $ value ) ; return $ this ; }
Set a specific header to be sent with the request.

@param string $key   Can also be a string in "foo: bar" format
@param mixed  $value
@param boolean  $preserveCase
Set a specific header to be sent with the request .