com.clouway.friendlyserve.Response Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fserve Show documentation
Show all versions of fserve Show documentation
Friendly Serving HTTP Library.
package com.clouway.friendlyserve;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
/**
* Response is representing the response of HTTP request.
*
* @author Miroslav Genov ([email protected])
*/
public interface Response {
/**
* A redirect URL address used to delegate.
*
* @return the redirect url if specified
*/
Status status();
/**
* HTTP response header.
*
* @return map of HTTP header pairs
* @throws IOException If something goes wrong
*/
Map header() throws IOException;
/**
* HTTP response body.
*
* @return Stream with body
* @throws IOException If something goes wrong
*/
InputStream body() throws IOException;
}