Skip to content

Instantly share code, notes, and snippets.

@videlalvaro
Created March 5, 2012 17:14
Show Gist options
  • Select an option

  • Save videlalvaro/1979512 to your computer and use it in GitHub Desktop.

Select an option

Save videlalvaro/1979512 to your computer and use it in GitHub Desktop.
content_types_accepted(ReqData, State) ->
{[{"application/json", accept_content}], ReqData, State}.
accept_content(ReqData, Context) ->
%% process the JSON data
{true, ReqData, Context}.
post_is_create(ReqData, State) ->
{true, ReqData, State}.
create_path(ReqData, #state{last_todo_id = TodoId} = State) ->
{NewId, ReqData, State}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment