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:
parent
00f3ae7d20
commit
ae95e87eb1
5 changed files with 11 additions and 11 deletions
|
@ -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">> ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue