public final class HttpHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
appendHeader(Map<String,Object> headers,
String key,
Object value)
Appends the key/value to the headers.
|
static Object |
extractHttpParameterValue(String value)
Extracts the parameter value.
|
static String |
getCharsetFromContentType(String contentType)
Deprecated.
use
IOHelper.getCharsetNameFromContentType(String) |
static boolean |
isSecureConnection(String uri) |
static boolean |
isStatusCodeOk(int statusCode,
String okStatusCodeRange)
Checks whether the given http status code is within the ok range
|
static int[] |
parserHttpVersion(String s) |
static void |
setCharsetFromContentType(String contentType,
org.apache.camel.Exchange exchange) |
public static boolean isSecureConnection(String uri)
public static int[] parserHttpVersion(String s) throws ProtocolException
ProtocolExceptionpublic static void setCharsetFromContentType(String contentType, org.apache.camel.Exchange exchange)
@Deprecated public static String getCharsetFromContentType(String contentType)
IOHelper.getCharsetNameFromContentType(String)public static void appendHeader(Map<String,Object> headers, String key, Object value)
List that contains the multiple values.headers - headerskey - the keyvalue - the valuepublic static Object extractHttpParameterValue(String value)
List containing the values.
If the value is not a HTTP multi value the value is returned as is.value - the parameter valuepublic static boolean isStatusCodeOk(int statusCode,
String okStatusCodeRange)
statusCode - the status codeokStatusCodeRange - the ok range (inclusive)Apache Camel