0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Update examples to the new interface

This commit is contained in:
Loïc Hoguin 2016-08-10 14:33:43 +02:00
parent 00f3ae7d20
commit ae95e87eb1
5 changed files with 11 additions and 11 deletions

View file

@ -44,7 +44,7 @@ resource_exists(Req, _State) ->
create_paste(Req, State) ->
PasteID = new_paste_id(),
{ok, [{<<"paste">>, Paste}], Req2} = cowboy_req:body_qs(Req),
{ok, [{<<"paste">>, Paste}], Req2} = cowboy_req:read_urlencoded_body(Req),
ok = file:write_file(full_path(PasteID), Paste),
case cowboy_req:method(Req2) of
<<"POST">> ->