mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Move HTTP types definitions to include/http.hrl (for now).
This commit is contained in:
parent
61d755f8cc
commit
02d825e003
2 changed files with 24 additions and 24 deletions
|
@ -12,6 +12,30 @@
|
||||||
%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
-type http_method() :: 'OPTIONS' | 'GET' | 'HEAD'
|
||||||
|
| 'POST' | 'PUT' | 'DELETE' | 'TRACE' | string().
|
||||||
|
-type http_uri() :: '*' | {absoluteURI, http | https, Host::string(),
|
||||||
|
Port::integer() | undefined, Path::string()}
|
||||||
|
| {scheme, Scheme::string(), string()}
|
||||||
|
| {abs_path, string()} | string().
|
||||||
|
-type http_version() :: {Major::integer(), Minor::integer()}.
|
||||||
|
-type http_header() :: 'Cache-Control' | 'Connection' | 'Date' | 'Pragma'
|
||||||
|
| 'Transfer-Encoding' | 'Upgrade' | 'Via' | 'Accept' | 'Accept-Charset'
|
||||||
|
| 'Accept-Encoding' | 'Accept-Language' | 'Authorization' | 'From' | 'Host'
|
||||||
|
| 'If-Modified-Since' | 'If-Match' | 'If-None-Match' | 'If-Range'
|
||||||
|
| 'If-Unmodified-Since' | 'Max-Forwards' | 'Proxy-Authorization' | 'Range'
|
||||||
|
| 'Referer' | 'User-Agent' | 'Age' | 'Location' | 'Proxy-Authenticate'
|
||||||
|
| 'Public' | 'Retry-After' | 'Server' | 'Vary' | 'Warning'
|
||||||
|
| 'Www-Authenticate' | 'Allow' | 'Content-Base' | 'Content-Encoding'
|
||||||
|
| 'Content-Language' | 'Content-Length' | 'Content-Location'
|
||||||
|
| 'Content-Md5' | 'Content-Range' | 'Content-Type' | 'Etag'
|
||||||
|
| 'Expires' | 'Last-Modified' | 'Accept-Ranges' | 'Set-Cookie'
|
||||||
|
| 'Set-Cookie2' | 'X-Forwarded-For' | 'Cookie' | 'Keep-Alive'
|
||||||
|
| 'Proxy-Connection' | string().
|
||||||
|
-type http_headers() :: list({http_header(), string()}).
|
||||||
|
%% -type http_cookies() :: term(). %% @todo
|
||||||
|
-type http_status() :: non_neg_integer() | string().
|
||||||
|
|
||||||
-record(http_req, {
|
-record(http_req, {
|
||||||
%% Transport.
|
%% Transport.
|
||||||
socket = undefined :: undefined | inet:socket(),
|
socket = undefined :: undefined | inet:socket(),
|
||||||
|
|
|
@ -25,27 +25,3 @@
|
||||||
-type dispatch_rules() :: {Host::match(), list({Path::match(),
|
-type dispatch_rules() :: {Host::match(), list({Path::match(),
|
||||||
Handler::module(), Opts::term()})}.
|
Handler::module(), Opts::term()})}.
|
||||||
-type dispatch() :: list(dispatch_rules()).
|
-type dispatch() :: list(dispatch_rules()).
|
||||||
|
|
||||||
-type http_method() :: 'OPTIONS' | 'GET' | 'HEAD'
|
|
||||||
| 'POST' | 'PUT' | 'DELETE' | 'TRACE' | string().
|
|
||||||
-type http_uri() :: '*' | {absoluteURI, http | https, Host::string(),
|
|
||||||
Port::integer() | undefined, Path::string()}
|
|
||||||
| {scheme, Scheme::string(), string()}
|
|
||||||
| {abs_path, string()} | string().
|
|
||||||
-type http_version() :: {Major::integer(), Minor::integer()}.
|
|
||||||
-type http_header() :: 'Cache-Control' | 'Connection' | 'Date' | 'Pragma'
|
|
||||||
| 'Transfer-Encoding' | 'Upgrade' | 'Via' | 'Accept' | 'Accept-Charset'
|
|
||||||
| 'Accept-Encoding' | 'Accept-Language' | 'Authorization' | 'From' | 'Host'
|
|
||||||
| 'If-Modified-Since' | 'If-Match' | 'If-None-Match' | 'If-Range'
|
|
||||||
| 'If-Unmodified-Since' | 'Max-Forwards' | 'Proxy-Authorization' | 'Range'
|
|
||||||
| 'Referer' | 'User-Agent' | 'Age' | 'Location' | 'Proxy-Authenticate'
|
|
||||||
| 'Public' | 'Retry-After' | 'Server' | 'Vary' | 'Warning'
|
|
||||||
| 'Www-Authenticate' | 'Allow' | 'Content-Base' | 'Content-Encoding'
|
|
||||||
| 'Content-Language' | 'Content-Length' | 'Content-Location'
|
|
||||||
| 'Content-Md5' | 'Content-Range' | 'Content-Type' | 'Etag'
|
|
||||||
| 'Expires' | 'Last-Modified' | 'Accept-Ranges' | 'Set-Cookie'
|
|
||||||
| 'Set-Cookie2' | 'X-Forwarded-For' | 'Cookie' | 'Keep-Alive'
|
|
||||||
| 'Proxy-Connection' | string().
|
|
||||||
-type http_headers() :: list({http_header(), string()}).
|
|
||||||
%% -type http_cookies() :: term(). %% @todo
|
|
||||||
-type http_status() :: non_neg_integer() | string().
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue