Class: PushPromise
Represents an HTTP/2 PUSH_PROMISE
frame.
Constructor
Constructs an http:PushPromise
from a given path and a method.
init (string path, string method)
Methods
hasHeader | Checks whether the requested header exists. |
getHeader | Returns the header value with the specified header name. |
getHeaders | Gets transport headers from the |
addHeader | Adds the specified key/value pair as an HTTP header to the |
setHeader | Sets the value of a transport header in the |
removeHeader | Removes a transport header from the |
removeAllHeaders | Removes all transport headers from the |
getHeaderNames | Gets all transport header names from the |
Fields
getHeader
Returns the header value with the specified header name. If there are more than one header value for the specified header name, the first value is returned.
Parameters
- headerName string
The header name
removeAllHeaders
function removeAllHeaders()
Removes all transport headers from the http:PushPromise
.