aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_cookies_list.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-03-11 19:45:16 +0100
committerLoïc Hoguin <[email protected]>2020-03-12 18:08:16 +0100
commit87d0bfff926892d2dc0a55a3dc45d8c5f8a682f3 (patch)
tree5b381d3d2c2f691699baeddad78c781026d237b7 /src/gun_cookies_list.erl
parent04790d3a281a42fbd65c9a44fe88f437cfe025f3 (diff)
downloadgun-87d0bfff926892d2dc0a55a3dc45d8c5f8a682f3.tar.gz
gun-87d0bfff926892d2dc0a55a3dc45d8c5f8a682f3.tar.bz2
gun-87d0bfff926892d2dc0a55a3dc45d8c5f8a682f3.zip
Make Gun use the cookie store when configured to
Diffstat (limited to 'src/gun_cookies_list.erl')
-rw-r--r--src/gun_cookies_list.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gun_cookies_list.erl b/src/gun_cookies_list.erl
index ccd2292..e8cf17a 100644
--- a/src/gun_cookies_list.erl
+++ b/src/gun_cookies_list.erl
@@ -17,6 +17,7 @@
-module(gun_cookies_list).
-export([init/0]).
+-export([init/1]).
-export([query/2]).
-export([set_cookie_secure_match/2]).
-export([set_cookie_take_exact_match/2]).
@@ -30,8 +31,15 @@
%% @todo max_cookies => non_neg_integer() | infinity
}.
+-type opts() :: #{
+}.
+
-spec init() -> {?MODULE, state()}.
init() ->
+ init(#{}).
+
+-spec init(opts()) -> {?MODULE, state()}.
+init(_Opts) ->
{?MODULE, #{cookies => []}}.
-spec query(State, uri_string:uri_map())