public class HttpCookieUtil extends Object
Modifier and Type | Method and Description |
---|---|
static HttpHeader |
addHttpCookie(HttpCookie cookie,
HttpResponse response)
Adds the
HttpCookie to the HttpResponse . |
static HttpCookie |
extractHttpCookie(String cookieName,
HttpRequest request)
Extracts a specific
HttpCookie from the HttpRequest . |
static List<HttpCookie> |
extractHttpCookies(HttpRequest request)
Extracts all the
HttpCookie instances from the
HttpRequest . |
public static List<HttpCookie> extractHttpCookies(HttpRequest request)
HttpCookie
instances from the
HttpRequest
.request
- HttpRequest
.HttpCookie
instances on the HttpRequest
.public static HttpCookie extractHttpCookie(String cookieName, HttpRequest request)
HttpCookie
from the HttpRequest
.cookieName
- Name of the HttpCookie
to retrieve from the
HttpRequest
.request
- HttpRequest
.HttpCookie
extracted from the HttpRequest
or
null
if no HttpCookie
by the name on the
HttpRequest
.public static HttpHeader addHttpCookie(HttpCookie cookie, HttpResponse response)
HttpCookie
to the HttpResponse
.cookie
- HttpCookie
to be added.response
- HttpResponse
to have the HttpCookie
added to
it as a HttpHeader
.HttpHeader
added to the HttpResponse
containing
the HttpCookie
.Copyright © 2005–2016. All rights reserved.