# `HttpCookie.TeslaMiddleware`
[🔗](https://github.com/reisub/http_cookie/blob/v0.11.0/lib/http_cookie/tesla_middleware.ex#L2)

Tesla middleware to automatically manage cookies using http_cookie.

Make sure to list the middleware _after_ any redirect handling
middleware like Tesla.Middleware.FollowRedirects to ensure
the cookie handling code is called before/after every redirect.

## Options

- `:jar_server` - HttpCookie.Jar.Server instance pid (required)

## Examples

    server_pid = HttpCookie.Jar.Server.start_link([])
    client = Tesla.client([{HttpCookie.TeslaMiddleware, jar_server: server_pid}])

---

*Consult [api-reference.md](api-reference.md) for complete listing*
