Modifiers | Name | Description |
---|---|---|
static char |
CHAR_PATH_DELIMITER |
|
static java.lang.String |
DELIMITER_FREE_HTTPS_PROTOCOL |
|
static java.lang.String |
DELIMITER_FREE_HTTP_PROTOCOL |
|
static java.lang.String |
HTTPS_PROTOCOL |
|
static java.lang.String |
HTTP_PROTOCOL |
|
static java.lang.String |
PATH_DELIMITER |
|
static java.lang.String |
PROTOCOL_ENDPOINT_DELIMITER |
Type Params | Return Type | Name and description |
---|---|---|
|
static boolean |
canHavePayload(HttpMethod method) |
|
static java.lang.String |
completeUrlWithHttpIfProtocolIsMissing(java.lang.String endpoint) |
|
static java.lang.String |
completeUrlWithHttpIfProtocolIsNotHttpOrHttpsOrPropertyExpansion(java.lang.String endpoint) |
|
static java.net.URI |
createUri(URI uri) |
|
static java.net.URI |
createUri(java.lang.String scheme, java.lang.String userInfo, java.lang.String host, int port, java.lang.String escapedPath, java.lang.String escapedQuery, java.lang.String escapedFragment) |
|
static java.lang.String |
extractHost(java.lang.String uriString) |
|
static java.lang.String |
extractHttpHeaderParameter(java.lang.String headerString, java.lang.String parameterName) |
|
static byte[] |
extractHttpResponseBody(byte[] buffer) Extracts the body of an HTTP response from a buffer containing both headers and body. |
|
static java.lang.String |
getBody(HttpRequestBase request) |
|
static java.lang.String |
getMediaType(java.lang.String contentType) |
|
static java.lang.String |
getPingErrorMessage() |
|
static java.util.Map<java.lang.String, java.util.List<java.lang.String>> |
getQueryMap(java.lang.String query) |
|
static java.util.Map<java.lang.String, java.lang.String> |
getQueryParams(java.lang.String query) |
|
static int |
getStatusCode(Response response) |
|
static boolean |
hasRequestBody(HttpMethod method) |
|
static boolean |
isErrorStatus(int statusCode) |
|
static boolean |
isHttpUrl(java.lang.String url) The method checks that the string is a HTTP or HTTPS URL. |
|
static boolean |
isSuccessStatus(int statusCode) |
|
static boolean |
isTextContentType(java.lang.String contentType) |
|
static boolean |
isURLAvailable(java.lang.String urlForChecking) Checks the availability of the resource by setting up the connection to it. |
|
static boolean |
isValidUrl(java.lang.String url) |
|
static java.lang.String |
percentEncode(java.lang.String stringToEncode) Percent-encodes string ignoring all of unreserved characters that RFC 3986 defines |
|
static boolean |
ping(java.lang.String host, int timeout) |
|
static java.lang.String |
prepareLink(java.lang.String caption, java.lang.String url) |
|
static boolean |
seemsToBeBinaryContentType(java.lang.String contentType) |
|
static java.lang.String |
sortQueryParams(java.lang.String query) Sorts parameters in query string, doesn't change parameters |
|
static java.lang.String |
sortQueryParams(java.lang.String query, boolean withPercentEncoding) Sorts parameters in query string |
|
static java.lang.String |
urlEncodeWithUtf8(java.lang.String input) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Extracts the body of an HTTP response from a buffer containing both headers and body.
buffer
- a byte array containing the complete HTTP response, including the HTTP headersThe method checks that the string is a HTTP or HTTPS URL.
url
- the string to testChecks the availability of the resource by setting up the connection to it.
urlForChecking
- a url to checkPercent-encodes string ignoring all of unreserved characters that RFC 3986 defines
stringToEncode
- string to percent-encodeSorts parameters in query string, doesn't change parameters
query
- query stringSorts parameters in query string
query
- query stringwithPercentEncoding
- if true, percent-encodes parameters' names and values