package base.interfaces;

import java.io.InputStream;
import java.util.Map;

/**
 * Defines a request's response.
 */
public interface IResponse {
	
	/**
	 * Indicates the status of the request (e.g. 200)
	 */
	public int getStatus();
	
	/**
	 * Returns the content of the response as a String.
	 * 
	 * @return String is the body of the response interpreted as a String
	 */
	public String getBody();
	
	/**
	 * Returns the raw InputStream of the response.
	 * 
	 * @return InputStream is a stream of bytes composing the response content
	 */
	public InputStream getBodyStream();
	
	/**
	 * Returns the response's content as an Item.
	 * 
	 * @return IItem is the response's content as an Item
	 */
	public IItem getItem();
	
	/**
	 * Indicates the phrase of the response status.
	 * 
	 * @return String is the phrase corresponding with the status
	 */
	public String getPhrase();
	
	/**
	 * Returns the headers included in the request's response.
	 * 
	 * @return Map<String, String> are the respone's headers
	 */
	public Map<String, String> getHeaders();
}
