|
|
@ -35,7 +35,22 @@ |
|
|
|
callback :: wsHer:callback() |
|
|
|
}). |
|
|
|
|
|
|
|
-export_type([req/0, http_method/0, body/0, headers/0, response_code/0]). |
|
|
|
|
|
|
|
%% @type req(). A record representing an HTTP request. |
|
|
|
-type req() :: #req{}. |
|
|
|
|
|
|
|
%% @type http_method(). An uppercase atom representing a known HTTP verb or a |
|
|
|
%% binary for other verbs. |
|
|
|
-type http_method() :: 'OPTIONS' | 'GET' | 'HEAD' | 'POST'| 'PUT' | 'DELETE' | 'TRACE' | binary(). |
|
|
|
|
|
|
|
%% @type body(). A binary or iolist. |
|
|
|
-type body() :: binary() | iolist(). |
|
|
|
|
|
|
|
-type header() :: {Key :: binary(), Value :: binary() | string()}. |
|
|
|
-type headers() :: [header()]. |
|
|
|
|
|
|
|
-type response_code() :: 100..999. |
|
|
|
|
|
|
|
|
|
|
|
-define(EXAMPLE_CONF, [{callback, elli_example_callback}, {callback_args, []}]). |
|
|
|