Class HttpCookie
- java.lang.Object
-
- com.mongodb.stitch.core.services.http.HttpCookie
-
public class HttpCookie extends Object
Represents a RFC 6265 cookie.
-
-
Method Summary
Modifier and Type Method Description String
getDomain()
Returns the domain to which this cookie belongs.String
getExpires()
Returns when the cookie expires.Integer
getMaxAge()
Returns how long the cookie can live for.String
getName()
Returns the name of the cookie.String
getPath()
Returns the path within the domain to which this cookie belongs.String
getValue()
Returns the value of the cookie.Boolean
isHttpOnly()
Returns whether or not this cookie can only be read by a server.Boolean
isSecure()
Returns whether or not this cookie can only be sent to HTTPS servers.
-
-
-
Constructor Detail
-
HttpCookie
public HttpCookie(@Nonnull String name, @Nonnull String value, @Nullable String path, @Nullable String domain, @Nullable String expires, @Nullable Integer maxAge, @Nullable Boolean secure, @Nullable Boolean httpOnly)
Constructs a new fully specified cookie.- Parameters:
name
- the name of the cookie.value
- the value of the cookie.path
- the path within the domain to which this cookie belongs.domain
- the domain to which this cookie belongs.expires
- when the cookie expires.maxAge
- how long the cookie can live for.secure
- whether or not this cookie can only be sent to HTTPS servers.httpOnly
- whether or not this cookie can only be read by a server.
-
-
Method Detail
-
getName
@Nonnull public String getName()
Returns the name of the cookie.- Returns:
- the name of the cookie.
-
getValue
@Nonnull public String getValue()
Returns the value of the cookie.- Returns:
- the value of the cookie.
-
getPath
@Nullable public String getPath()
Returns the path within the domain to which this cookie belongs.- Returns:
- the path within the domain to which this cookie belongs.
-
getDomain
@Nullable public String getDomain()
Returns the domain to which this cookie belongs.- Returns:
- the domain to which this cookie belongs.
-
getExpires
@Nullable public String getExpires()
Returns when the cookie expires.- Returns:
- when the cookie expires.
-
getMaxAge
@Nullable public Integer getMaxAge()
Returns how long the cookie can live for.- Returns:
- how long the cookie can live for.
-
isSecure
@Nullable public Boolean isSecure()
Returns whether or not this cookie can only be sent to HTTPS servers.- Returns:
- whether or not this cookie can only be sent to HTTPS servers.
-
-