Package oracle.stellent.ridc.common.util
Class HttpUtils
java.lang.Object
oracle.stellent.ridc.common.util.HttpUtils
Class for holding utility methods for working with HTTP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<NameValuePair>convertToNVPairs(String query) Convert the query string into a list of Name Value pairscreateParametersFromQuery(String queryString) Build a map of query name to value from a HTTP query stringstatic StringcreateQueryFromParameters(Map<String, String> parameters, Protocol.NullHandlingStrategy nullStrategy) Create the query string from the parameters.static URIreplaceQueryString(URI uri, String queryString) Replace the query string with a new string in an URI
-
Constructor Details
-
HttpUtils
public HttpUtils()
-
-
Method Details
-
createParametersFromQuery
Build a map of query name to value from a HTTP query string- Parameters:
queryString- a URL-encoded query string (param=value¶m2=value2)- Returns:
- a mapping of param name to value
-
createQueryFromParameters
public static String createQueryFromParameters(Map<String, String> parameters, Protocol.NullHandlingStrategy nullStrategy) Create the query string from the parameters.- Parameters:
parameters- a name/value pair mapping of HTTP parameters- Returns:
- a URL-encoded string, does not include the beginning "?" character
-
convertToNVPairs
Convert the query string into a list of Name Value pairs- Parameters:
query- the query string- Returns:
- the name value pair
-
replaceQueryString
Replace the query string with a new string in an URI- Parameters:
uri- the uriqueryString- the new query string- Returns:
- the new URI
-