From ae95e87eb1c352b96b43a431fd4693d7d80a4b64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 10 Aug 2016 14:33:43 +0200 Subject: Update examples to the new interface --- examples/rest_pastebin/src/toppage_handler.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/rest_pastebin/src/toppage_handler.erl') diff --git a/examples/rest_pastebin/src/toppage_handler.erl b/examples/rest_pastebin/src/toppage_handler.erl index 86bafb7..ddf4c50 100644 --- a/examples/rest_pastebin/src/toppage_handler.erl +++ b/examples/rest_pastebin/src/toppage_handler.erl @@ -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">> -> -- cgit v1.2.3