0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-16 13:10:24 +00:00

Add meta/2 and meta/3 to cowboy_http_req to save useful protocol information

* cowboy_http_protocol now defines 'websocket_version' as metadata.
* cowboy_http_rest now defines 'media_type', 'language', 'charset' as metadata.
This commit is contained in:
Loïc Hoguin 2011-12-19 09:44:24 +01:00
parent f9bd5d1061
commit f390dbd606
4 changed files with 40 additions and 17 deletions

View file

@ -60,6 +60,7 @@
headers = [] :: http_headers(),
p_headers = [] :: [any()], %% @todo Improve those specs.
cookies = undefined :: undefined | http_cookies(),
meta = [] :: [{atom(), any()}],
%% Request body.
body_state = waiting :: waiting | done,