Package com.atlassian.bamboo.utils
Class HttpUtils
- java.lang.Object
-
- com.atlassian.bamboo.utils.HttpUtils
-
public class HttpUtils extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpUtils.EndpointSpec
-
Field Summary
Fields Modifier and Type Field Description static String
CONTENT_ENCODING_COMPRESS
static String
CONTENT_ENCODING_DEFLATE
static String
CONTENT_ENCODING_GZIP
static String
CONTENT_ENCODING_X_COMPRESS
static String
CONTENT_ENCODING_X_GZIP
static String
HEADER_ACCEPT_ENCODING
static String
HEADER_CONTENT_ENCODING
static String
HEADER_VARY
static String
HTTP_SCHEME
static String
HTTPS_SCHEME
static String
KEY_HTTP_PROXY_HOST
static String
KEY_HTTP_PROXY_PORT
static String
KEY_HTTPS_PROXY_HOST
static String
KEY_HTTPS_PROXY_PORT
static String
TRANSFER_ENCODING
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
canMethodMutateState(@NotNull String method)
static @Nullable HttpUtils.EndpointSpec
getProxyForScheme(@Nullable String scheme)
static boolean
isDefaultPort(@NotNull String scheme, int port)
-
-
-
Field Detail
-
KEY_HTTP_PROXY_HOST
public static final String KEY_HTTP_PROXY_HOST
- See Also:
- Constant Field Values
-
KEY_HTTP_PROXY_PORT
public static final String KEY_HTTP_PROXY_PORT
- See Also:
- Constant Field Values
-
KEY_HTTPS_PROXY_HOST
public static final String KEY_HTTPS_PROXY_HOST
- See Also:
- Constant Field Values
-
KEY_HTTPS_PROXY_PORT
public static final String KEY_HTTPS_PROXY_PORT
- See Also:
- Constant Field Values
-
HTTPS_SCHEME
public static final String HTTPS_SCHEME
- See Also:
- Constant Field Values
-
HTTP_SCHEME
public static final String HTTP_SCHEME
- See Also:
- Constant Field Values
-
HEADER_CONTENT_ENCODING
public static final String HEADER_CONTENT_ENCODING
- See Also:
- Constant Field Values
-
HEADER_ACCEPT_ENCODING
public static final String HEADER_ACCEPT_ENCODING
- See Also:
- Constant Field Values
-
HEADER_VARY
public static final String HEADER_VARY
- See Also:
- Constant Field Values
-
TRANSFER_ENCODING
public static final String TRANSFER_ENCODING
- See Also:
- Constant Field Values
-
CONTENT_ENCODING_GZIP
public static final String CONTENT_ENCODING_GZIP
- See Also:
- Constant Field Values
-
CONTENT_ENCODING_X_GZIP
public static final String CONTENT_ENCODING_X_GZIP
- See Also:
- Constant Field Values
-
CONTENT_ENCODING_COMPRESS
public static final String CONTENT_ENCODING_COMPRESS
- See Also:
- Constant Field Values
-
CONTENT_ENCODING_X_COMPRESS
public static final String CONTENT_ENCODING_X_COMPRESS
- See Also:
- Constant Field Values
-
CONTENT_ENCODING_DEFLATE
public static final String CONTENT_ENCODING_DEFLATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isDefaultPort
public static boolean isDefaultPort(@NotNull @NotNull String scheme, int port)
- Parameters:
scheme
- http or httpsport
- the port ot check- Returns:
- true if the port is the default port for given scheme
-
getProxyForScheme
@Nullable public static @Nullable HttpUtils.EndpointSpec getProxyForScheme(@Nullable @Nullable String scheme)
- Parameters:
scheme
- for which proxy data should be returned, null if any available data should be returned (then, HTTPS has preference over HTTP)- Returns:
-
canMethodMutateState
public static boolean canMethodMutateState(@NotNull @NotNull String method)
- Parameters:
method
- the request to check- Returns:
- true iff the HTTP method is a non-mutative method.
-
-