Stores HTTP cookies.
It extracts cookies from HTTP requests, and returns them in HTTP responses.
CookieJarInterface instances automatically expire contained cookies when
necessary. Subclasses are also responsible for storing and retrieving
cookies from a file, database, etc.
-
link
https://docs.
python. Inspirationorg/2/library/cookielib. html -
extends
\IteratorAggregate
-
Implements
Countable IteratorAggregate Traversable
Methods |
public
abstract
clear
(
?
string
$domain
=
NULL
,
?
string
$path
=
NULL
,
?
string
$name
=
NULL
) :
void
Remove cookies currently held in the cookie jar. Invoking this method without arguments will empty the whole cookie jar. |
public
abstract
clearSessionCookies
() :
void
Discard all sessions cookies. Removes cookies that don't have an expire field or a have a discard |
public
abstract
extractCookies
(
Psr\Http\Message\RequestInterface
$request
,
Psr\Http\Message\ResponseInterface
$response
) :
void
Extract cookies from an HTTP response and store them in the CookieJar. |
public
abstract
setCookie
(
GuzzleHttp\Cookie\SetCookie
$cookie
) :
bool
Sets a cookie in the cookie jar.
|
public
abstract
toArray
() :
array
Converts the cookie jar to an array. |
public
abstract
withCookieHeader
(
Psr\Http\Message\RequestInterface
$request
) :
Psr\Http\Message\RequestInterface
Create a request with added cookie headers. If no matching cookies are found in the cookie jar, then no Cookie
|