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

com.clouway.friendlyserve.Response Maven / Gradle / Ivy

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy