All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mockserver.model.Cookie Maven / Gradle / Ivy

There is a newer version: 5.15.0
Show newest version
package org.mockserver.model;

import static org.mockserver.model.NottableOptionalString.optionalString;
import static org.mockserver.model.NottableSchemaString.schemaString;
import static org.mockserver.model.NottableString.string;

/**
 * @author jamesdbloom
 */
public class Cookie extends KeyAndValue {

    public Cookie(String name, String value) {
        super(name, value);
    }

    public Cookie(NottableString name, NottableString value) {
        super(name, value);
    }

    public static Cookie cookie(String name, String value) {
        return new Cookie(name, value);
    }

    public static Cookie cookie(NottableString name, NottableString value) {
        return new Cookie(name, value);
    }

    public static Cookie schemaCookie(String name, String value) {
        return new Cookie(string(name), schemaString(value));
    }

    public static Cookie optionalCookie(String name, String value) {
        return new Cookie(optionalString(name), string(value));
    }

    public static Cookie optionalCookie(String name, NottableString value) {
        return new Cookie(optionalString(name), value);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy