mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Move cowboy_protocol:onrequest_fun() to cowboy:onrequest_fun()
This commit is contained in:
parent
df73a4d0a5
commit
488dcc967b
2 changed files with 4 additions and 3 deletions
|
@ -29,6 +29,9 @@
|
|||
-type http_version() :: 'HTTP/1.1' | 'HTTP/1.0'.
|
||||
-export_type([http_version/0]).
|
||||
|
||||
-type onrequest_fun() :: fun((Req) -> Req).
|
||||
-export_type([onrequest_fun/0]).
|
||||
|
||||
%% @doc Start an HTTP listener.
|
||||
-spec start_http(any(), non_neg_integer(), any(), any()) -> {ok, pid()}.
|
||||
start_http(Ref, NbAcceptors, TransOpts, ProtoOpts)
|
||||
|
|
|
@ -56,10 +56,8 @@
|
|||
-export([parse_request/3]).
|
||||
-export([resume/6]).
|
||||
|
||||
-type onrequest_fun() :: fun((Req) -> Req).
|
||||
-type onresponse_fun() ::
|
||||
fun((cowboy:http_status(), cowboy:http_headers(), iodata(), Req) -> Req).
|
||||
-export_type([onrequest_fun/0]).
|
||||
-export_type([onresponse_fun/0]).
|
||||
|
||||
-record(state, {
|
||||
|
@ -68,7 +66,7 @@
|
|||
middlewares :: [module()],
|
||||
compress :: boolean(),
|
||||
env :: cowboy_middleware:env(),
|
||||
onrequest :: undefined | onrequest_fun(),
|
||||
onrequest :: undefined | cowboy:onrequest_fun(),
|
||||
onresponse = undefined :: undefined | onresponse_fun(),
|
||||
max_empty_lines :: non_neg_integer(),
|
||||
req_keepalive = 1 :: non_neg_integer(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue