public final class RequestHelper extends Object
User: Pavel Abizyaev, Date: 11.08.14 15:00
.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_URL_ENCODING_CODEPAGE |
Modifier | Constructor and Description |
---|---|
private |
RequestHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
buildQuery(Map<String,String> params) |
static JsonException |
convertErrorDetailsToException(String content,
int responseCode) |
static ErrorDetails |
convertExceptionToErrorDetails(JsonException exception) |
static boolean |
isStatusCodeInSuccessfulClass(int statusCode)
Returns
true if status code is 2xx. |
static StreamResponse |
requestStream(String method,
HttpMethod httpMethod,
URL url,
String authentication,
String eTag,
Map<String,String> params,
ConnectionWriter body,
String mimeType,
Transport transport) |
static StringResponse |
requestString(String method,
HttpMethod httpMethod,
URL url,
String authentication,
String eTag,
Map<String,String> params,
ConnectionWriter body,
String mimeType,
Transport transport) |
static void |
requestVoid(String method,
HttpMethod httpMethod,
URL url,
String authentication,
String eTag,
Map<String,String> params,
ConnectionWriter body,
String mimeType,
Transport transport) |
public static final String DEFAULT_URL_ENCODING_CODEPAGE
public static ErrorDetails convertExceptionToErrorDetails(JsonException exception)
public static JsonException convertErrorDetailsToException(String content, int responseCode) throws InstantiationException, IllegalAccessException, ClassNotFoundException
public static boolean isStatusCodeInSuccessfulClass(int statusCode)
true
if status code is 2xx.statusCode
- http response codepublic static void requestVoid(String method, HttpMethod httpMethod, URL url, String authentication, String eTag, Map<String,String> params, ConnectionWriter body, String mimeType, Transport transport)
public static StreamResponse requestStream(String method, HttpMethod httpMethod, URL url, String authentication, String eTag, Map<String,String> params, ConnectionWriter body, String mimeType, Transport transport)
public static StringResponse requestString(String method, HttpMethod httpMethod, URL url, String authentication, String eTag, Map<String,String> params, ConnectionWriter body, String mimeType, Transport transport)
Copyright © 2015. All rights reserved.