public static okhttp3.Cookie asOkhttp3Cookie(Cookie cookie) {
        if (cookie == null) {
            throw new NullArgumentException("cookie can't be null");
        }
        Builder builder = new Builder();
        builder.name(cookie.getName());
        builder.value(cookie.getValue());
        builder.expiresAt(cookie.getExpiresAt());
        if (cookie.getDomain() != null && cookie.getDomain().startsWith(".")) {
            cookie.setDomain(cookie.getDomain().replaceFirst(".", ""));
        }
        if (cookie.getDomain() != null) {
            builder.domain(cookie.getDomain());
        } else {
            builder.domain("");
        }

        builder.path(cookie.getPath());
        if (cookie.isSecure()) {
            builder.secure();
        }
        if (cookie.isHttpOnly()) {
            builder.httpOnly();
        }
        return builder.build();
    }
Builds a new okhttp3 cookie from given cookie values

@param cookie
@return okhttp3 cookie
@throws NullArgumentException if argument cookie is null;
ache/src/main/java/achecrawler/crawler/cookies/CookieUtils.java