Class HttpUtils
java.lang.Object
org.htmlunit.http.HttpUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDate format pattern used to parse HTTP date headers in RFC 1036 format. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatDate(Date date) Formats the given date according to the RFC 1123 pattern.static DateParses a date value.static List<NameValuePair> parseUrlQuery(String s, Charset charset) Returns a list ofNameValuePairs URI query parameters.static StringtoQueryFormFields(Iterable<? extends NameValuePair> parameters, Charset charset)
-
Field Details
-
PATTERN_RFC1036
Date format pattern used to parse HTTP date headers in RFC 1036 format.- See Also:
-
-
Method Details
-
parseDate
-
formatDate
-
parseUrlQuery
Returns a list ofNameValuePairs URI query parameters. By convention,'&'and';'are accepted as parameter separators.- Parameters:
s- URI query component.charset- charset to use when decoding the parameters.- Returns:
- list of query parameters.
-
toQueryFormFields
public static String toQueryFormFields(Iterable<? extends NameValuePair> parameters, Charset charset) - Parameters:
parameters- the paramterscharset- the charset- Returns:
- the query string from the given parameters
-