public final class HttpHelper extends Object
Modifier | Constructor and Description |
---|---|
private |
HttpHelper()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static String |
formatAcceptLanguageHeader(Locale acceptLanguage) |
static String |
getSellerCorporateId(String sellerId) |
static String |
getSellerCountry(String sellerId) |
static String |
getSellerId(String country,
String corporateId) |
static String |
integerToETag(Integer val) |
static boolean |
isStatusCodeInSuccessfulClass(int statusCode)
Returns
true if status code is 2xx. |
static String |
shortify(long value) |
public static final String ETAG
public static final String EXPIRES
public static final String LAST_MODIFIED
public static final String CONNECTION
public static final String CONTENT_LENGTH
public static final String CONTENT_TYPE
public static final String CONTENT_TYPE_APPLICATION_JSON
public static final String CONTENT_TYPE_APPLICATION_JAVASCRIPT
public static final String CONTENT_TYPE_APPLICATION_X_JAVASCRIPT
public static final String CONTENT_TYPE_PNG
public static final String ETAG_QUOTED_FORMAT
public static final String UTF_8
public static final String DEFAULT_URL_ENCODING_CODEPAGE
public static final String ENCODING_FOR_BODY
public static final Locale DEFAULT_LOCALE
public static final int RESPONSE_CODE_OK
public static final int RESPONSE_NOT_MODIFIED
public static final int RESPONSE_BAD_REQUEST
public static final int RESPONSE_UNAUTHORIZED
public static final int RESPONSE_FORBIDDEN
public static final int RESPONSE_NOT_FOUND
public static final int RESPONSE_CONFLICT
public static final int RESPONSE_PRECONDITION_FAILED
public static final int RESPONSE_INTERNAL_SERVER_ERROR
public static final int RESPONSE_NOT_IMPLEMENTED
public static final int SERVICE_TEMPORARILY_UNAVAILABLE
public static final String AUTHORIZATION
public static final String ACCEPT
public static final String JSONP_DEFAULT_CALLBACK
public static final String ENCODING_FOR_TOKEN
public static final Charset CHARSET_FOR_TOKEN
public static final Charset CHARSET_UTF8
public static String shortify(long value)
public static boolean isStatusCodeInSuccessfulClass(int statusCode)
true
if status code is 2xx.statusCode
- http response codeCopyright © 2015. All rights reserved.