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