EventHttpRequest::addHeader
(PECL event >= 1.4.0-beta)
EventHttpRequest::addHeader — Adds an HTTP header to the headers of the request
說明
public EventHttpRequest::addHeader( string
$key , string $value , int $type ): boolAdds an HTTP header to the headers of the request.
參數
-
key Header name.
-
value Header value.
-
type One of
EventHttpRequest::*_HEADERconstants .
返回值
成功時返回 true, 或者在失敗時返回 false。
參見
- EventHttpRequest::removeHeader() - Removes an HTTP header from the headers of the request