Class ResponseProcessCookies
- java.lang.Object
-
- org.apache.hc.client5.http.protocol.ResponseProcessCookies
-
- All Implemented Interfaces:
org.apache.hc.core5.http.HttpResponseInterceptor
@Contract(threading=STATELESS) public class ResponseProcessCookies extends java.lang.Object implements org.apache.hc.core5.http.HttpResponseInterceptor
Response interceptor that populates the currentCookieStore
with data contained in response cookies received in the given the HTTP response.- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description static ResponseProcessCookies
INSTANCE
Singleton instance.private static org.slf4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description ResponseProcessCookies()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
formatCookie(Cookie cookie)
void
process(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.EntityDetails entity, org.apache.hc.core5.http.protocol.HttpContext context)
private void
processCookies(java.lang.String exchangeId, java.util.Iterator<org.apache.hc.core5.http.Header> iterator, CookieSpec cookieSpec, CookieOrigin cookieOrigin, CookieStore cookieStore)
-
-
-
Field Detail
-
INSTANCE
public static final ResponseProcessCookies INSTANCE
Singleton instance.- Since:
- 5.2
-
LOG
private static final org.slf4j.Logger LOG
-
-
Method Detail
-
process
public void process(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.EntityDetails entity, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException, java.io.IOException
- Specified by:
process
in interfaceorg.apache.hc.core5.http.HttpResponseInterceptor
- Throws:
org.apache.hc.core5.http.HttpException
java.io.IOException
-
processCookies
private void processCookies(java.lang.String exchangeId, java.util.Iterator<org.apache.hc.core5.http.Header> iterator, CookieSpec cookieSpec, CookieOrigin cookieOrigin, CookieStore cookieStore)
-
formatCookie
private static java.lang.String formatCookie(Cookie cookie)
-
-