Object -
http
:
PushPromise
Represents an HTTP/2 PUSH_PROMISE
frame.
Constructor
__init
(string path, string method)
- path string /
-
The resource path
- method string GET
-
The HTTP method
Methods
Checks whether the requested header exists.
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.
Gets transport headers from the PushPromise
.
Adds the specified key/value pair as an HTTP header to the PushPromise
.
Sets the value of a transport header in PushPromise
.
Removes a transport header from the PushPromise
.
Removes all transport headers from the PushPromise
.
Gets all transport header names from the PushPromise
.
Fields
- path string
-
The resource path
- method string
-
The HTTP method
Checks whether the requested header exists.
Parameters
- headerName string
-
The header name
-
Return Type
(boolean) A
boolean
representing the existence of a given header
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
-
Return Type
(string) The header value, or null if there is no such header
Gets transport headers from the PushPromise
.
Parameters
- headerName string
-
The header name
-
Return Type
(string[]) The array of header values
Adds the specified key/value pair as an HTTP header to the PushPromise
.
Parameters
- headerName string
-
The header name
- headerValue string
-
The header value
Sets the value of a transport header in PushPromise
.
Parameters
- headerName string
-
The header name
- headerValue string
-
The header value
Removes a transport header from the PushPromise
.
Parameters
- headerName string
-
The header name