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.HttpResponseInterceptorResponse interceptor that populates the currentCookieStorewith data contained in response cookies received in the given the HTTP response.- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description static ResponseProcessCookiesINSTANCESingleton instance.private static org.slf4j.LoggerLOG
-
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.StringformatCookie(Cookie cookie)voidprocess(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.EntityDetails entity, org.apache.hc.core5.http.protocol.HttpContext context)private voidprocessCookies(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:
processin interfaceorg.apache.hc.core5.http.HttpResponseInterceptor- Throws:
org.apache.hc.core5.http.HttpExceptionjava.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)
-
-