org.spincast.plugins.httpclient.IHttpResponse Maven / Gradle / Ivy
 The newest version!
        
        package org.spincast.plugins.httpclient;
import java.util.List;
import java.util.Map;
import org.spincast.core.cookies.ICookie;
public interface IHttpResponse {
    /**
     * Gets the HTTP status.
     */
    public int getStatus();
    /**
     * Gets the Content-Type.
     */
    public String getContentType();
    /**
     * Gets the headers.
     */
    public Map> getHeaders();
    /**
     * Gets an header. An header can have more than 
     * one value.
     */
    public List getHeader(String name);
    /**
     * Gets the first value of an header.
     */
    public String getHeaderFirst(String name);
    /**
     * Gets the cookies.
     */
    public Map getCookies();
    /**
     * Gets a cookie.
     */
    public ICookie getCookie(String name);
    /**
     * Is the response gzipped?
     */
    public boolean isGzipped();
    /**
     * Gets the content as a UTF-8 String.
     */
    public String getContentAsString();
    /**
     * Gets the content as a String using the specified
     * encoding.
     */
    public String getContentAsString(String encoding);
    /**
     * Get the content as byte[].
     */
    public byte[] getContentAsByteArray();
}
       © 2015 - 2025 Weber Informatics LLC | Privacy Policy