public class HttpParser extends Object
Constructor and Description |
---|
HttpParser() |
Modifier and Type | Method and Description |
---|---|
static String |
appendQueryParam(String url,
String queryParamName,
String queryParamValue)
Appends a query parameter to an URL that may or may not contain query parameters already.
|
static ParameterMap |
decodeQueryString(String queryString) |
static ParameterMap |
decodeString(String encodedString,
String encoding) |
static ParameterMap |
decodeUriParams(String pathWithUriParams,
String requestPath)
Decodes uri params from a request path
|
static ParameterMap |
decodeUrlEncodedBody(String urlEncodedBody,
String encoding) |
static String |
encodeQueryString(Map parameters) |
static String |
encodeSpaces(String path)
Encodes spaces in a path, replacing them by %20.
|
static String |
encodeString(String encoding,
Map parameters) |
static String |
extractPath(String uri) |
static String |
extractQueryParams(String uri) |
static String |
getContentTypeSubType(String contentType)
Extracts the subtype from a content type
|
static String |
normalizePathWithSpacesOrEncodedSpaces(String path)
Normalize a path that may contains spaces, %20 or +.
|
static Collection<HttpPart> |
parseMultipartContent(InputStream content,
String contentType) |
static String |
sanitizePathWithStartSlash(String path) |
public static Collection<HttpPart> parseMultipartContent(InputStream content, String contentType) throws IOException
IOException
public static ParameterMap decodeQueryString(String queryString)
public static ParameterMap decodeUrlEncodedBody(String urlEncodedBody, String encoding)
public static ParameterMap decodeString(String encodedString, String encoding)
public static ParameterMap decodeUriParams(String pathWithUriParams, String requestPath)
pathWithUriParams
- path with uri param place holdersrequestPath
- request pathpublic static String getContentTypeSubType(String contentType)
contentType
- the content typepublic static String normalizePathWithSpacesOrEncodedSpaces(String path)
path
- path with encoded spaces or raw spacespublic static String encodeSpaces(String path)
path
- Path that may contain spacespublic static String appendQueryParam(String url, String queryParamName, String queryParamValue)
url
- base URL to apply the new query parameterqueryParamName
- query parameter namequeryParamValue
- query parameter valueCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.