public class HttpUtils extends Object
Constructor and Description |
---|
HttpUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
completeUrlWithHttpIfProtocolIsMissing(String endpoint) |
static String |
completeUrlWithHttpIfProtocolIsNotHttpOrHttpsOrPropertyExpansion(String endpoint) |
static URI |
createUri(String scheme,
String userinfo,
String host,
int port,
String escapedPath,
String escapedQuery,
String escapedFragment) |
static URI |
createUri(URI uri) |
static String |
extractHttpHeaderParameter(String headerString,
String parameterName) |
static String |
getPingErrorMessage() |
static boolean |
isErrorStatus(int statusCode) |
static boolean |
ping(String host,
int timeout) |
static String |
urlEncodeWithUtf8(String input) |
public static boolean isErrorStatus(int statusCode)
public static String extractHttpHeaderParameter(String headerString, String parameterName)
public static String completeUrlWithHttpIfProtocolIsNotHttpOrHttpsOrPropertyExpansion(String endpoint)
public static String completeUrlWithHttpIfProtocolIsMissing(String endpoint)
public static boolean ping(String host, int timeout)
public static String getPingErrorMessage()
public static URI createUri(URI uri) throws URISyntaxException, URIException
URISyntaxException
URIException
public static URI createUri(String scheme, String userinfo, String host, int port, String escapedPath, String escapedQuery, String escapedFragment) throws URISyntaxException
URISyntaxException
Copyright © 2019. All Rights Reserved.