forked from enisdenjo/graphql-ws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(uWebSockets): Add
persistedRequest
to context extra and deprec…
…ate uWS's stack allocated `request` (enisdenjo#196) Co-authored-by: enisdenjo <badurinadenis@gmail.com>
- Loading branch information
Showing
6 changed files
with
202 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[graphql-ws](../README.md) / [use/uWebSockets](../modules/use_uwebsockets.md) / PersistedRequest | ||
|
||
# Interface: PersistedRequest | ||
|
||
[use/uWebSockets](../modules/use_uwebsockets.md).PersistedRequest | ||
|
||
The initial HTTP upgrade request before the actual | ||
socket and connection is established. | ||
|
||
uWS's request is stack allocated and cannot be accessed | ||
from outside of the internal upgrade; therefore, the persisted | ||
request holds relevant values extracted from the uWS's request | ||
while it is accessible. | ||
|
||
## Table of contents | ||
|
||
### Properties | ||
|
||
- [headers](use_uwebsockets.persistedrequest.md#headers) | ||
- [method](use_uwebsockets.persistedrequest.md#method) | ||
- [query](use_uwebsockets.persistedrequest.md#query) | ||
- [url](use_uwebsockets.persistedrequest.md#url) | ||
|
||
## Properties | ||
|
||
### headers | ||
|
||
• **headers**: *IncomingHttpHeaders* | ||
|
||
___ | ||
|
||
### method | ||
|
||
• **method**: *string* | ||
|
||
___ | ||
|
||
### query | ||
|
||
• **query**: *string* | ||
|
||
The raw query string (after the `?` sign) or empty string. | ||
|
||
___ | ||
|
||
### url | ||
|
||
• **url**: *string* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[graphql-ws](../README.md) / [use/uWebSockets](../modules/use_uwebsockets.md) / UpgradeData | ||
|
||
# Interface: UpgradeData | ||
|
||
[use/uWebSockets](../modules/use_uwebsockets.md).UpgradeData | ||
|
||
Data acquired during the HTTP upgrade callback from uWS. | ||
|
||
## Hierarchy | ||
|
||
- **UpgradeData** | ||
|
||
↳ [*Extra*](use_uwebsockets.extra.md) | ||
|
||
## Table of contents | ||
|
||
### Properties | ||
|
||
- [persistedRequest](use_uwebsockets.upgradedata.md#persistedrequest) | ||
- [request](use_uwebsockets.upgradedata.md#request) | ||
|
||
## Properties | ||
|
||
### persistedRequest | ||
|
||
• `Readonly` **persistedRequest**: [*PersistedRequest*](use_uwebsockets.persistedrequest.md) | ||
|
||
The initial HTTP upgrade request before the actual | ||
socket and connection is established. | ||
|
||
uWS's request is stack allocated and cannot be accessed | ||
from outside of the internal upgrade; therefore, the persisted | ||
request holds the relevant values extracted from the uWS's request | ||
while it is accessible. | ||
|
||
___ | ||
|
||
### request | ||
|
||
• `Readonly` **request**: HttpRequest | ||
|
||
The initial HTTP request before the actual | ||
socket and connection is established. | ||
|
||
**`deprecated`** uWS.HttpRequest is stack allocated and cannot be accessed outside the internal `upgrade` callback. Consider using the `persistedRequest` instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters