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

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

There is a newer version: 5.15.0
Show newest version
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