mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Move cowboy_protocol:onresponse_fun() to cowboy:onresponse_fun()
This commit is contained in:
parent
488dcc967b
commit
1d413ea51b
3 changed files with 7 additions and 7 deletions
|
@ -32,6 +32,10 @@
|
|||
-type onrequest_fun() :: fun((Req) -> Req).
|
||||
-export_type([onrequest_fun/0]).
|
||||
|
||||
-type onresponse_fun() ::
|
||||
fun((http_status(), http_headers(), iodata(), Req) -> Req).
|
||||
-export_type([onresponse_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,6 @@
|
|||
-export([parse_request/3]).
|
||||
-export([resume/6]).
|
||||
|
||||
-type onresponse_fun() ::
|
||||
fun((cowboy:http_status(), cowboy:http_headers(), iodata(), Req) -> Req).
|
||||
-export_type([onresponse_fun/0]).
|
||||
|
||||
-record(state, {
|
||||
socket :: inet:socket(),
|
||||
transport :: module(),
|
||||
|
@ -67,7 +63,7 @@
|
|||
compress :: boolean(),
|
||||
env :: cowboy_middleware:env(),
|
||||
onrequest :: undefined | cowboy:onrequest_fun(),
|
||||
onresponse = undefined :: undefined | onresponse_fun(),
|
||||
onresponse = undefined :: undefined | cowboy:onresponse_fun(),
|
||||
max_empty_lines :: non_neg_integer(),
|
||||
req_keepalive = 1 :: non_neg_integer(),
|
||||
max_keepalive :: non_neg_integer(),
|
||||
|
|
|
@ -174,7 +174,7 @@
|
|||
|
||||
%% Functions.
|
||||
onresponse = undefined :: undefined | already_called
|
||||
| cowboy_protocol:onresponse_fun()
|
||||
| cowboy:onresponse_fun()
|
||||
}).
|
||||
|
||||
-opaque req() :: #http_req{}.
|
||||
|
@ -194,7 +194,7 @@
|
|||
binary(), binary(), binary(),
|
||||
cowboy:http_version(), cowboy:http_headers(), binary(),
|
||||
inet:port_number() | undefined, binary(), boolean(), boolean(),
|
||||
undefined | cowboy_protocol:onresponse_fun())
|
||||
undefined | cowboy:onresponse_fun())
|
||||
-> req().
|
||||
new(Socket, Transport, Peer, Method, Path, Query,
|
||||
Version, Headers, Host, Port, Buffer, CanKeepalive,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue