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

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

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

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author jamesdbloom
 */
public class HttpRequest extends ModelObject {
    private String method = "";
    private String path = "";
    private String body = "";
    private List
headers = new ArrayList
(); private List parameters = new ArrayList(); private List cookies = new ArrayList(); public HttpRequest() { } public HttpRequest withMethod(String method) { this.method = method; return this; } public String getMethod() { return method; } public String getPath() { return path; } public HttpRequest withPath(String path) { this.path = path; return this; } public String getBody() { return body; } public HttpRequest withBody(String body) { this.body = body; return this; } public HttpRequest withHeaders(List
headers) { this.headers = headers; return this; } public HttpRequest withHeaders(Header... headers) { this.headers = Arrays.asList(headers); return this; } public List
getHeaders() { return headers; } public HttpRequest withCookies(List cookies) { this.cookies = cookies; return this; } public HttpRequest withCookies(Cookie... cookies) { this.cookies = Arrays.asList(cookies); return this; } public List getCookies() { return cookies; } public HttpRequest withParameters(List parameters) { this.parameters = parameters; return this; } public HttpRequest withParameters(Parameter... parameters) { this.parameters = Arrays.asList(parameters); return this; } public List getParameters() { return parameters; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy