mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Add shortcuts to reply functions
New functions are reply/2, reply/3, chunked_reply/2 in cowboy_http_req.
This commit is contained in:
parent
2a324aca3a
commit
81cc99d10b
5 changed files with 21 additions and 5 deletions
|
@ -17,7 +17,7 @@ terminate(_Req, _State) ->
|
|||
exit(badarg).
|
||||
|
||||
websocket_init(_TransportName, Req, _Opts) ->
|
||||
Req2 = cowboy_http_req:reply(403, [], [], Req),
|
||||
Req2 = cowboy_http_req:reply(403, Req),
|
||||
{shutdown, Req2}.
|
||||
|
||||
websocket_handle(_Frame, _Req, _State) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue