Class HttpUtil
java.lang.Object
jodd.http.HttpUtil
Few HTTP utilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildQuery(HttpMultiMap<?> queryMap, String encoding) Builds a query string from given query map.static StringextractContentTypeCharset(String contentType) static StringextractHeaderParameter(String header, String parameter, char separator) Extracts header parameter.static StringextractKeepAliveMax(String keepAlive) static StringextractKeepAliveTimeout(String keepAlive) Extract keep-alive timeout.static StringextractMediaType(String contentType) Extracts media-type from value of "Content Type" header.static booleanisAbsoluteUrl(String url) Determines if path is relative or absolute.static HttpMultiMap<String> parseQuery(String query, boolean decode) Parses query from give query string.static StringprepareHeaderParameterName(String headerName) Makes nice header names.
-
Constructor Details
-
HttpUtil
public HttpUtil()
-
-
Method Details
-
buildQuery
Builds a query string from given query map. -
parseQuery
Parses query from give query string. Values are optionally decoded. -
prepareHeaderParameterName
-
extractMediaType
-
extractContentTypeCharset
-
extractKeepAliveTimeout
-
extractKeepAliveMax
-
extractHeaderParameter
-
isAbsoluteUrl
Determines if path is relative or absolute. https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 A relative reference that begins with a single slash character is termed an absolute-path reference. A relative reference that does not begin with a slash character is termed a relative-path reference. A path segment that contains a colon character (e.g., "this:that") cannot be used as the first segment of a relative-path reference, as it would be mistaken for a scheme name.
-