aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-09-24 14:39:17 +0300
committerLoïc Hoguin <[email protected]>2014-09-24 14:39:17 +0300
commitaa4d86b81f6095316813c599659014c15bf9b935 (patch)
treed503405a06e70c314975cde6dbf706939825890a /doc/src/manual
parent25259671f51c076720b64959a700263eaa0937b2 (diff)
downloadcowboy-aa4d86b81f6095316813c599659014c15bf9b935.tar.gz
cowboy-aa4d86b81f6095316813c599659014c15bf9b935.tar.bz2
cowboy-aa4d86b81f6095316813c599659014c15bf9b935.zip
Remove the onrequest hook
It was redundant with middlewares. Allows us to save a few operations for every incoming requests.
Diffstat (limited to 'doc/src/manual')
-rw-r--r--doc/src/manual/cowboy.ezdoc9
-rw-r--r--doc/src/manual/cowboy_protocol.ezdoc5
-rw-r--r--doc/src/manual/cowboy_req.ezdoc6
-rw-r--r--doc/src/manual/cowboy_spdy.ezdoc5
4 files changed, 2 insertions, 23 deletions
diff --git a/doc/src/manual/cowboy.ezdoc b/doc/src/manual/cowboy.ezdoc
index 209d473..c26ed37 100644
--- a/doc/src/manual/cowboy.ezdoc
+++ b/doc/src/manual/cowboy.ezdoc
@@ -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())
diff --git a/doc/src/manual/cowboy_protocol.ezdoc b/doc/src/manual/cowboy_protocol.ezdoc
index 6813295..335f2ff 100644
--- a/doc/src/manual/cowboy_protocol.ezdoc
+++ b/doc/src/manual/cowboy_protocol.ezdoc
@@ -14,7 +14,6 @@ as a Ranch protocol.
| {max_keepalive, non_neg_integer()}
| {max_request_line_length, non_neg_integer()}
| {middlewares, [module()]}
- | {onrequest, cowboy:onrequest_fun()}
| {onresponse, cowboy:onresponse_fun()}
| {timeout, timeout()}]
@@ -67,10 +66,6 @@ Maximum length of the request line.
List of middlewares to execute for every requests.
-: onrequest (undefined)
-
-Fun called every time a request is received.
-
: onresponse (undefined)
Fun called every time a response is sent.
diff --git a/doc/src/manual/cowboy_req.ezdoc b/doc/src/manual/cowboy_req.ezdoc
index 94556b2..bcec9b9 100644
--- a/doc/src/manual/cowboy_req.ezdoc
+++ b/doc/src/manual/cowboy_req.ezdoc
@@ -126,8 +126,7 @@ Types:
Return the requested URL excluding the path component.
This function will always return `undefined` until the
-`cowboy_router` middleware has been executed. This includes
-the `onrequest` hook.
+`cowboy_router` middleware has been executed.
: match_cookies(Req, Fields) -> Map
@@ -371,8 +370,7 @@ Types:
Return the requested URL.
This function will always return `undefined` until the
-`cowboy_router` middleware has been executed. This includes
-the `onrequest` hook.
+`cowboy_router` middleware has been executed.
: version(Req) -> Version
diff --git a/doc/src/manual/cowboy_spdy.ezdoc b/doc/src/manual/cowboy_spdy.ezdoc
index 51a2110..534434c 100644
--- a/doc/src/manual/cowboy_spdy.ezdoc
+++ b/doc/src/manual/cowboy_spdy.ezdoc
@@ -6,7 +6,6 @@ The `cowboy_spdy` module implements SPDY/3 as a Ranch protocol.
: opts() = [{env, cowboy_middleware:env()}
| {middlewares, [module()]}
- | {onrequest, cowboy:onrequest_fun()}
| {onresponse, cowboy:onresponse_fun()}]
Configuration for the SPDY protocol handler.
@@ -30,10 +29,6 @@ Initial middleware environment.
List of middlewares to execute for every requests.
-: onrequest (undefined)
-
-Fun called every time a request is received.
-
: onresponse (undefined)
Fun called every time a response is sent.