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

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

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

/**
 * @author jamesdbloom
 */
public class OutboundHttpRequest extends HttpRequest {

    private final String host;
    private final Integer port;
    private final String contextPath;

    public OutboundHttpRequest(String host, Integer port, String contextPath, HttpRequest httpRequest) {
        this.host = host;
        this.port = port;
        this.contextPath = contextPath;
        this.secure = httpRequest.secure;
        this.method = httpRequest.method;
        this.path = httpRequest.path;
        this.queryStringParameters = httpRequest.queryStringParameters;
        this.body = httpRequest.body;
        this.headers = httpRequest.headers;
        this.cookies = httpRequest.cookies;
        this.isKeepAlive = httpRequest.isKeepAlive;
    }

    public static OutboundHttpRequest outboundRequest(String host, Integer port, String contextPath, HttpRequest httpRequest) {
        return new OutboundHttpRequest(host, port, contextPath, httpRequest);
    }


    public String getHost() {
        return host;
    }

    public Integer getPort() {
        return port;
    }

    public String getContextPath() {
        return contextPath;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy