org.mockserver.model.HttpMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockserver-core Show documentation
Show all versions of mockserver-core Show documentation
Functionality used by all MockServer modules for matching and expectations
package org.mockserver.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.nio.charset.Charset;
import java.util.List;
/**
* @author jamesdbloom
*/
@SuppressWarnings("rawtypes")
public interface HttpMessage extends Message {
T withBody(String body);
T withBody(String body, Charset charset);
T withBody(byte[] body);
T withBody(B body);
B getBody();
@JsonIgnore
byte[] getBodyAsRawBytes();
@JsonIgnore
String getBodyAsString();
Headers getHeaders();
T withHeaders(Headers headers);
T withHeaders(List headers);
T withHeaders(Header... headers);
T withHeader(Header header);
T withHeader(String name, String... values);
T withHeader(NottableString name, NottableString... values);
T withContentType(MediaType mediaType);
T replaceHeader(Header header);
List getHeaderList();
List getHeader(String name);
String getFirstHeader(String name);
boolean containsHeader(String name);
T removeHeader(String name);
T removeHeader(NottableString name);
Cookies getCookies();
T withCookies(Cookies cookies);
T withCookies(List cookies);
T withCookies(Cookie... cookies);
T withCookie(Cookie cookie);
T withCookie(String name, String value);
T withCookie(NottableString name, NottableString value);
List getCookieList();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy