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

com.hubspot.horizon.HttpResponse Maven / Gradle / Ivy

There is a newer version: 0.3.0
Show newest version
package com.hubspot.horizon;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.JsonNode;

import java.io.InputStream;

public interface HttpResponse {
  HttpRequest getRequest();

  int getStatusCode();
  boolean isSuccess();
  boolean isError();
  boolean isClientError();
  boolean isServerError();

  Headers getHeaders();

   T getAs(Class clazz);
   T getAs(TypeReference type);
   T getAs(JavaType type);

  JsonNode getAsJsonNode();
  String getAsString();
  byte[] getAsBytes();
  InputStream getAsInputStream();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy