0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-16 05:00:24 +00:00

Remove the onrequest hook

It was redundant with middlewares. Allows us to save a few operations
for every incoming requests.
This commit is contained in:
Loïc Hoguin 2014-09-24 14:39:17 +03:00
parent 25259671f5
commit aa4d86b81f
12 changed files with 86 additions and 260 deletions

View file

@ -25,15 +25,6 @@ A binary status can be used to set a custom message.
HTTP version.
: onrequest_fun() = fun((cowboy_req:req()) -> cowboy_req:req())
Fun called immediately after receiving a request.
It can perform any operation on the Req object, including
reading the request body or replying. If a reply is sent,
the processing of the request ends here, before any middleware
is executed.
: onresponse_fun() = fun((http_status(), http_headers(),
iodata(), cowboy_req:req()) -> cowboy_req:req())