0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +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

@ -7,8 +7,8 @@
init(Req, Opts) ->
NewValue = integer_to_list(rand:uniform(1000000)),
Req2 = cowboy_req:set_resp_cookie(
<<"server">>, NewValue, [{path, <<"/">>}], Req),
Req2 = cowboy_req:set_resp_cookie(<<"server">>, NewValue,
#{path => <<"/">>}, Req),
#{client := ClientCookie, server := ServerCookie}
= cowboy_req:match_cookies([{client, [], <<>>}, {server, [], <<>>}], Req2),
{ok, Body} = toppage_dtl:render([