HttpCookie.ReqServerPlugin (http_cookie v0.9.0)
View SourceAutomatically manages cookies using http_cookie with a cookie jar server.
Summary
Functions
Attaches the plugin to the request pipeline.
Functions
@spec attach(Req.Request.t(), opts :: keyword()) :: Req.Request.t()
Attaches the plugin to the request pipeline.
Request Options
:jar_server- HttpCookie.Jar.Server instance pid (required)
Examples
{:ok, server_pid} = HttpCookie.Jar.Server.start_link([])
client = Req.new(url: "http://httpbun.com") |> HttpCookie.ReqServerPlugin.attach(jar_server: server_pid)