Top Description Fields Constructors Methods
org.apache.hc.client5.http.impl.cookie

public Class IgnoreSpecSpec

extends CookieSpecBase
Class Inheritance
Annotations
@Contract
threading:STATELESS
Imports
java.util.Collections, .List, org.apache.hc.client5.http.cookie.Cookie, .CookieOrigin, .MalformedCookieException, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.http.Header

CookieSpec that ignores all cookies
Since
4.1

Field Summary

Modifier and TypeField and Description
public static final IgnoreSpecSpec
INSTANCE

Singleton instance.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public List<Header>
formatCookies(final List<Cookie>
the Cookies format into a Cookie header
cookies
)

Implements org.apache.hc.client5.http.cookie.CookieSpec.formatCookies.

Create "Cookie" headers for an array of Cookies.
public boolean
match(final Cookie
the Cookie to be matched
cookie
,
final CookieOrigin
the target to test against
origin
)

Overrides org.apache.hc.client5.http.impl.cookie.CookieSpecBase.match.

Implements org.apache.hc.client5.http.cookie.CookieSpec.match.

Determines if a Cookie matches the target location.
public List<Cookie>
parse(final Header
the Set-Cookie received from the server
header
,
final CookieOrigin
details of the cookie origin
origin
)

Implements org.apache.hc.client5.http.cookie.CookieSpec.parse.

Parse the "Set-Cookie" Header into an array of Cookies.
Inherited from org.apache.hc.client5.http.impl.cookie.CookieSpecBase:
getDefaultDomaingetDefaultPathparsevalidate

Field Detail

INSTANCEback to summary
public static final IgnoreSpecSpec INSTANCE

Singleton instance.

Since
5.2

Constructor Detail

IgnoreSpecSpecback to summary
public IgnoreSpecSpec()

Method Detail

formatCookiesback to summary
public List<Header> formatCookies(final List<Cookie> cookies)

Implements org.apache.hc.client5.http.cookie.CookieSpec.formatCookies.

Doc from org.apache.hc.client5.http.cookie.CookieSpec.formatCookies.

Create "Cookie" headers for an array of Cookies.

Parameters
cookies:List<Cookie>

the Cookies format into a Cookie header

Returns:List<Header>

a Header for the given Cookies.

Annotations
@Override
matchback to summary
public boolean match(final Cookie cookie, final CookieOrigin origin)

Overrides org.apache.hc.client5.http.impl.cookie.CookieSpecBase.match.

Implements org.apache.hc.client5.http.cookie.CookieSpec.match.

Doc from org.apache.hc.client5.http.cookie.CookieSpec.match.

Determines if a Cookie matches the target location.

Parameters
cookie:Cookie

the Cookie to be matched

origin:CookieOrigin

the target to test against

Returns:boolean

true if the cookie should be submitted with a request with given attributes, false otherwise.

Annotations
@Override
parseback to summary
public List<Cookie> parse(final Header header, final CookieOrigin origin) throws MalformedCookieException

Implements org.apache.hc.client5.http.cookie.CookieSpec.parse.

Doc from org.apache.hc.client5.http.cookie.CookieSpec.parse.

Parse the "Set-Cookie" Header into an array of Cookies.

This method will not perform the validation of the resultant Cookies

Parameters
header:Header

the Set-Cookie received from the server

origin:CookieOrigin

details of the cookie origin

Returns:List<Cookie>

an array of Cookies parsed from the header

Annotations
@Override
Exceptions
MalformedCookieException:
if an exception occurs during parsing