T - type of the response objectpublic final class ObjectResponse<T> extends HttpResponse
HttpResponse that makes client code cleaner when dealing with java object that can be
de-serialized from response body.| Modifier and Type | Method and Description |
|---|---|
static <T> ObjectResponse<T> |
fromJsonBody(HttpResponse response,
Class<T> typeOfObject) |
static <T> ObjectResponse<T> |
fromJsonBody(HttpResponse response,
Class<T> typeOfObject,
com.google.gson.Gson gson) |
static <T> ObjectResponse<T> |
fromJsonBody(HttpResponse response,
Type typeOfObject) |
static <T> ObjectResponse<T> |
fromJsonBody(HttpResponse response,
Type typeOfObject,
com.google.gson.Gson gson) |
static <T> ObjectResponse<T> |
fromJsonBody(HttpResponse response,
com.google.common.reflect.TypeToken<T> typeOfObject) |
static <T> ObjectResponse<T> |
fromJsonBody(HttpResponse response,
com.google.common.reflect.TypeToken<T> typeOfObject,
com.google.gson.Gson gson) |
T |
getResponseObject() |
getHeaders, getResponseBody, getResponseBodyAsString, getResponseBodyAsString, getResponseCode, getResponseMessage, toStringpublic static <T> ObjectResponse<T> fromJsonBody(HttpResponse response, Type typeOfObject, com.google.gson.Gson gson)
public static <T> ObjectResponse<T> fromJsonBody(HttpResponse response, Type typeOfObject)
public static <T> ObjectResponse<T> fromJsonBody(HttpResponse response, com.google.common.reflect.TypeToken<T> typeOfObject, com.google.gson.Gson gson)
public static <T> ObjectResponse<T> fromJsonBody(HttpResponse response, com.google.common.reflect.TypeToken<T> typeOfObject)
public static <T> ObjectResponse<T> fromJsonBody(HttpResponse response, Class<T> typeOfObject, com.google.gson.Gson gson)
public static <T> ObjectResponse<T> fromJsonBody(HttpResponse response, Class<T> typeOfObject)
public T getResponseObject()
Copyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.