We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a65e77 commit a1da6ccCopy full SHA for a1da6cc
1 file changed
README.md
@@ -49,3 +49,15 @@ req =
49
%{private: %{cookie_jar: updated_jar}} = Req.get!(req, url: "/one", cookie_jar: empty_jar)
50
%{private: %{cookie_jar: updated_jar}} = Req.get!(req, url: "/two", cookie_jar: updated_jar)
51
```
52
+
53
+### Usage with `Tesla`
54
55
+HttpCookie can be used with [Tesla](https://github.com/elixir-tesla/tesla) to automatically set and parse cookies in HTTP requests:
56
57
+```elixir
58
+{:ok, server_pid} = HttpCookie.Jar.Server.start_link()
59
+tesla = Tesla.client([{HttpCookie.TeslaMiddleware, jar_server: server_pid}])
60
61
+Tesla.get!(tesla, "https://example.com/one")
62
+Tesla.get!(tesla, "https://example.com/two")
63
+```
0 commit comments