Class HttpUtils
java.lang.Object
org.projectnessie.client.http.impl.HttpUtils
Utility methods for HTTP clients.
This class should only be used by Nessie HTTP client implementations.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyHeaders(HttpHeaders headers, URLConnection con) static voidcheckArgument(boolean expression, String msg, Object... vars) Check if argument is false.static StringcheckNonNullTrim(String str) check if base is null and if not trim any whitespace.static booleanparseQueryString(String query) Parse query parameters from URI.
-
Field Details
-
GZIP
- See Also:
-
DEFLATE
- See Also:
-
GZIP_DEFLATE
- See Also:
-
HEADER_ACCEPT
- See Also:
-
HEADER_ACCEPT_ENCODING
- See Also:
-
HEADER_CONTENT_ENCODING
- See Also:
-
HEADER_CONTENT_TYPE
- See Also:
-
-
Method Details
-
checkArgument
Check if argument is false. If false throw formatted error.- Parameters:
expression- expression which should be truemsg- message with formattingvars- string format args
-
checkNonNullTrim
check if base is null and if not trim any whitespace.- Parameters:
str- string to check if null- Returns:
- trimmed str
-
applyHeaders
-
parseQueryString
Parse query parameters from URI. This method cannot handle multiple values for the same parameter.- Parameters:
query- They query string to parse- Returns:
- map of query parameters
-
isHttpUri
-