Skip to content

Commit

Permalink
Update documentation to follow upstream API
Browse files Browse the repository at this point in the history
  • Loading branch information
lafka committed Nov 13, 2012
1 parent 69fa12e commit f9e27d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ payload marshalling and automagically map cowboy callbacks to your methods.

-include_lib("tavern/include/rest_module.hrl").

%% Expose these HTTP methods, default will only expose ['HEAD', 'GET]
%% Expose these HTTP methods, default will only expose [<<"HEAD">>, <<"GET">>]
%% The OPTIONS is handled by handle_default_options/2
allowed_methods(Req, State) ->
{['GET', 'PUT', 'OPTIONS'], Req, State}.
{[<<"GET">>, <<"PUT">>, <<"OPTIONS">>], Req, State}.

%% The Accept types, default will allow for xml, json, html and text
content_types_provided(Req, State) ->
Expand All @@ -59,7 +59,7 @@ handle_put(Req, #tavern{body = _Body} = State) ->
handle_get(Req, #tavern{} = State) ->
%% The entire cowboy is available if needed
{Resource, Req} = cowboy_http_req:binding(resource, Req),

%% The return data is a tree structure where leafes are string, binary or atom.
%% There is no support for handling XML attributes or self-closing elements and
%% the structure is more akine to JSON.
Expand Down Expand Up @@ -130,5 +130,5 @@ matched with the `Content-Type` header for the mime & charset.
##Building Edoc##

By default, `./rebar doc` generates Github-flavored Markdown files.
If you want to change this, remove the `edoc_opts` line from `rebar.config`.Gproc was first introduced at the ACM SIGPLAN Erlang Workshop in
If you want to change this, remove the `edoc_opts` line from `rebar.config`.

0 comments on commit f9e27d1

Please sign in to comment.