Type Definitions
ArrayBuffer
It can be anything that is indexed containing integers, has a length property and is iterable.
Type:
-
Array.<number>
HttpRequest
The Request information for an HTTP request
All header keys must be lower case
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
method |
string
|
The method for the HTTP request. Required to be GET if upgrading to WebSocket |
|
httpVersion |
number
|
string
|
The version of the HTTP protocol used. Required to be 1.1 or higher if upgrading to WebSocket |
|
headers.connection |
string
|
<optional> |
The header defining the connection type. Required to be Upgrade if upgrading to WebSocket |
headers.upgrade |
string
|
<optional> |
The header defining what protocol to upgrade to if connection is upgrade. Required to be websocket if upgrading to WebSocket |
headers.sec-websocket-version |
string
|
<optional> |
The version of the WebSocket protocol to use. Required to be 13 if upgrading to WebSocket |
headers.sec-websocket-key |
string
|
<optional> |
The base64 encoded 16 bytes random key generated by the client |
Type:
-
Object