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

com.outbrain.ob1k.http.Response Maven / Gradle / Ivy

The newest version!
package com.outbrain.ob1k.http;

import com.outbrain.ob1k.http.common.Cookie;

import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.ByteBuffer;
import java.util.List;
import java.util.Map;

/**
 * Represents the http response of request execution

 * @see RequestBuilder
 * @author marenzon
 */
public interface Response {

  int getStatusCode();

  String getStatusText();

  URI getUri() throws URISyntaxException;

  String getUrl();

  String getContentType();

  byte[] getResponseBodyAsBytes() throws IOException;

  InputStream getResponseBodyAsStream() throws IOException;

  ByteBuffer getResponseBodyAsByteBuffer() throws IOException;

  List getCookies();

  String getResponseBody() throws IOException;

  String getHeader(String name);

  List getHeaders(String name);

  Map> getHeaders();

  boolean isRedirected();

  boolean hasResponseBody();

  boolean hasResponseStatus();

  boolean hasResponseHeaders();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy