| Constructor and Description |
|---|
HttpUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
decode(String value)
Decode value.
|
static String |
encode(String value)
encode value.
|
static org.springframework.util.MultiValueMap<String,String> |
getParameters(org.springframework.http.HttpRequest request)
Get Parameters from the specified
request. |
static org.springframework.util.MultiValueMap<String,String> |
getParameters(Iterable<String> pairs)
Get Parameters from the specified pairs of name-value.
|
static org.springframework.util.MultiValueMap<String,String> |
getParameters(String... pairs)
Get Parameters from the specified pairs of name-value.
|
static org.springframework.util.MultiValueMap<String,String> |
getParameters(String queryString)
Get Parameters from the specified query string.
|
static String |
normalizePath(String path)
Normalize path:
To remove query string if presents
To remove duplicated slash("/") if exists.
|
static String[] |
toNameAndValues(Map<String,List<String>> nameAndValuesMap) |
static Set<String> |
toNameAndValuesSet(Map<String,List<String>> nameAndValuesMap)
To the name and value line sets.
|
static String |
toQueryString(Map<String,List<String>> params)
Generate a string of query string from the specified request parameters
Map. |
public static String normalizePath(String path)
path - path to be normalizedpublic static org.springframework.util.MultiValueMap<String,String> getParameters(org.springframework.http.HttpRequest request)
request.request - the specified requestpublic static org.springframework.util.MultiValueMap<String,String> getParameters(String queryString)
queryString - The query stringpublic static org.springframework.util.MultiValueMap<String,String> getParameters(Iterable<String> pairs)
pairs - The pairs of name-valuepublic static org.springframework.util.MultiValueMap<String,String> getParameters(String... pairs)
pairs - The pairs of name-valuepublic static Set<String> toNameAndValuesSet(Map<String,List<String>> nameAndValuesMap)
nameAndValuesMap - MultiValueMap the map of name and valuespublic static String toQueryString(Map<String,List<String>> params)
Map.params - the specified request parameters Mappublic static String decode(String value)
value - the value requires to decodeCopyright © 2021 Pivotal Software, Inc.. All rights reserved.