3 ms·
There are definitely edge cases here (like what if the handler already wrote a body and it was sent on the wire, etc), but this is absolutely the pattern to use
by andrewstuart2 4y ago
There are definitely edge cases here (like what if the handler already wrote a body and it was sent on the wire, etc), but this is absolutely the pattern to use, and one of my favorite parts of a type system that allows methods on function types.
- catlifeonmars 4y agoYes, or what if you want to upgrade the connection to a websocket?