public class HttpClientHelpers
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
HttpClientHelpers.AbstractBasicResponseConsumer<T> |
static class |
HttpClientHelpers.AlgoResponseHandler |
static class |
HttpClientHelpers.JsonDeserializeResponseHandler<T> |
Modifier and Type | Method and Description |
---|---|
static org.apache.http.entity.ByteArrayEntity |
byteArrayEntity(byte[] input,
org.apache.http.entity.ContentType contentType) |
static org.apache.http.entity.InputStreamEntity |
inputStreamEntity(java.io.InputStream input,
org.apache.http.entity.ContentType contentType) |
static AlgoResponse |
jsonToAlgoResponse(com.google.gson.JsonElement json) |
static com.google.gson.JsonElement |
parseResponseJson(org.apache.http.HttpResponse response) |
static org.apache.http.entity.StringEntity |
stringEntity(java.lang.String input,
org.apache.http.entity.ContentType contentType) |
static void |
throwIfJsonHasError(com.google.gson.JsonElement json) |
static void |
throwIfNotOk(org.apache.http.HttpResponse response) |
public static AlgoResponse jsonToAlgoResponse(com.google.gson.JsonElement json) throws APIException
APIException
public static void throwIfNotOk(org.apache.http.HttpResponse response) throws APIException
APIException
public static void throwIfJsonHasError(com.google.gson.JsonElement json) throws APIException
APIException
public static com.google.gson.JsonElement parseResponseJson(org.apache.http.HttpResponse response) throws APIException
APIException
public static org.apache.http.entity.StringEntity stringEntity(java.lang.String input, org.apache.http.entity.ContentType contentType)
public static org.apache.http.entity.ByteArrayEntity byteArrayEntity(byte[] input, org.apache.http.entity.ContentType contentType)
public static org.apache.http.entity.InputStreamEntity inputStreamEntity(java.io.InputStream input, org.apache.http.entity.ContentType contentType)