Skip to content

Commit

Permalink
Add support for "parse" hook.
Browse files Browse the repository at this point in the history
This is documentation for elysiajs/elysia#33 and can be merged after that.
  • Loading branch information
Quals6 authored Apr 9, 2023
1 parent a03803d commit 3f0feb4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/patterns/websocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,11 @@ drain(
): this
```

## parse
`Parse` middleware to parse the request before upgrading the HTTP connection to WebSocket.

## beforeHandle
`Before Handle` middleware which execute before upgrade HTTP connection to WebSocket.
`Before Handle` middleware which execute before upgrading the HTTP connection to WebSocket.

Ideal place for validation.

Expand Down

0 comments on commit 3f0feb4

Please sign in to comment.