public class RequestUtil extends Object
Constructor and Description |
---|
RequestUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
checkForInvalidMultipleParameters(List<RequestValue> params)
Checks for parameter list validity.
|
static String |
convertToStandardInternetMediaType(String mediaType)
Converts short form of media type to the proper internet standard, e.g.
|
static String |
getRequestMediaType(String contentMediaType)
Returns best match for Content-Type header or the original media type if it doesn't match.
|
static List<RequestValue> |
getResIds(SqlResource sqlResource,
String[] values)
Returns name-value pairs, resourceId and value, for given resource and ordered value array.
|
static String |
getResponseMediaType(List<RequestValue> params,
String requestMediaType,
String acceptMediaType)
Determines content type from parameters, and removing the output param if present.
|
public static String convertToStandardInternetMediaType(String mediaType)
public static List<RequestValue> getResIds(SqlResource sqlResource, String[] values)
InvalidRequestException
public static String getRequestMediaType(String contentMediaType)
public static String getResponseMediaType(List<RequestValue> params, String requestMediaType, String acceptMediaType)
HttpRequestAttributes.DEFAULT_MEDIA_TYPE
. Note: The content parameter value overrides the accept media
type!public static void checkForInvalidMultipleParameters(List<RequestValue> params) throws InvalidRequestException
InvalidRequestException
- if a parameter is included more than once unless there the operatorsCopyright © 2011-2018 restSQL Project Contributors