HttpCookie.Jar.Server (http_cookie v0.9.0)
View SourceHTTP Cookie Jar Server
Thin GenServer wrapper around HttpCookie.Jar. This is a convenience to enable usage with HTTP clients which don't have a way to store and pass back the updated jar.
Summary
Functions
Returns a specification to start this module under a supervisor.
Formats the cookie for sending in a request header for the provided URL.
Returns the internal cookie jar.
Processes the response header list for the given request URL. Parses set-cookie headers and stores valid cookies.
Starts the jar server.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec get_cookie_header_value(pid :: pid(), request_url :: URI.t()) :: {:ok, String.t()} | {:error, :no_matching_cookies}
Formats the cookie for sending in a request header for the provided URL.
@spec get_cookie_jar(pid :: pid()) :: {:ok, HttpCookie.Jar.t()}
Returns the internal cookie jar.
@spec put_cookies_from_headers( pid :: pid(), request_url :: URI.t(), headers :: list() ) :: HttpCookie.Jar.t()
Processes the response header list for the given request URL. Parses set-cookie headers and stores valid cookies.
Starts the jar server.