mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 13:10:24 +00:00
Move the dispatcher related types into cowboy_dispatcher.
This commit is contained in:
parent
6712eaa5c8
commit
2beb5c8206
5 changed files with 17 additions and 14 deletions
|
@ -46,13 +46,13 @@
|
|||
method = 'GET' :: http_method(),
|
||||
version = {1, 1} :: http_version(),
|
||||
peer = undefined :: undefined | {Address::inet:ip_address(), Port::port_number()},
|
||||
host = undefined :: undefined | path_tokens(),
|
||||
host = undefined :: undefined | cowboy_dispatcher:path_tokens(),
|
||||
raw_host = undefined :: undefined | string(),
|
||||
path = undefined :: undefined | '*' | path_tokens(),
|
||||
path = undefined :: undefined | '*' | cowboy_dispatcher:path_tokens(),
|
||||
raw_path = undefined :: undefined | string(),
|
||||
qs_vals = undefined :: undefined | list({Name::string(), Value::string() | true}),
|
||||
raw_qs = undefined :: undefined | string(),
|
||||
bindings = undefined :: undefined | bindings(),
|
||||
bindings = undefined :: undefined | cowboy_dispatcher:bindings(),
|
||||
headers = [] :: http_headers(),
|
||||
%% cookies = undefined :: undefined | http_cookies() %% @todo
|
||||
|
||||
|
|
|
@ -17,11 +17,3 @@
|
|||
|
||||
-type posix() :: atom().
|
||||
-type port_number() :: 0..65535.
|
||||
|
||||
-type bindings() :: list({Key::atom(), Value::string()}).
|
||||
-type path_tokens() :: list(nonempty_string()).
|
||||
-type match_rule() :: '_' | '*' | list(string() | '_' | atom()).
|
||||
|
||||
-type dispatch_rule() :: {Host::match_rule(), list({Path::match_rule(),
|
||||
Handler::module(), Opts::term()})}.
|
||||
-type dispatch_rules() :: list(dispatch_rule()).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue