public class Http extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Http.BaseUrl
Base URL of S3 endpoint.
|
static class |
Http.Body
|
static class |
Http.Headers
HTTP headers.
|
static class |
Http.Method
HTTP methods.
|
static class |
Http.QueryParameters
HTTP query parameters.
|
static class |
Http.Request
HTTP request.
|
static class |
Http.RequestBody
HTTP request body of
RandomAccessFile, ByteBuffer or byte array. |
static class |
Http.S3Request
S3 request.
|
| Modifier and Type | Field and Description |
|---|---|
static okhttp3.MediaType |
DEFAULT_MEDIA_TYPE |
static long |
DEFAULT_TIMEOUT |
static Http.Body |
EMPTY_BODY |
static okhttp3.MediaType |
JSON_MEDIA_TYPE |
static String |
US_EAST_1 |
static okhttp3.MediaType |
XML_MEDIA_TYPE |
| Constructor and Description |
|---|
Http() |
| Modifier and Type | Method and Description |
|---|---|
static okhttp3.OkHttpClient |
disableCertCheck(okhttp3.OkHttpClient client)
Disables TLS certificate check as a special case for self-signed certificate and testing to the
specified HTTP client.
|
static okhttp3.OkHttpClient |
enableExternalCertificates(okhttp3.OkHttpClient client,
String filePath,
String dirPath)
Enable external TLS certificates from given file path and all valid files from dir path.
|
static okhttp3.OkHttpClient |
enableExternalCertificatesFromEnv(okhttp3.OkHttpClient client)
Enables external TLS certificates from SSL_CERT_FILE and SSL_CERT_DIR environment variables if
present.
|
static okhttp3.OkHttpClient |
enableJKSCertificates(okhttp3.OkHttpClient httpClient,
String trustStorePath,
String trustStorePassword,
String keyStorePath,
String keyStorePassword)
Enables JKS formatted TLS certificates to the specified HTTP client.
|
static okhttp3.OkHttpClient |
enablePKCS12Certificates(okhttp3.OkHttpClient httpClient,
String trustStorePath,
String trustStorePassword,
String keyStorePath,
String keyStorePassword)
Enables PKCS12 formatted TLS certificates to the specified HTTP client.
|
static okhttp3.MediaType |
mediaType(String value)
Gets media type of the specified string value.
|
static okhttp3.OkHttpClient |
newDefaultClient()
Creates new HTTP client with default timeout with additional TLS certificates from
SSL_CERT_FILE and SSL_CERT_DIR environment variables if present.
|
static okhttp3.OkHttpClient |
setTimeout(okhttp3.OkHttpClient client,
long connectTimeout,
long writeTimeout,
long readTimeout)
Sets connect, write and read timeout in milliseconds to the specified HTTP client.
|
public static final okhttp3.MediaType DEFAULT_MEDIA_TYPE
public static final okhttp3.MediaType XML_MEDIA_TYPE
public static final okhttp3.MediaType JSON_MEDIA_TYPE
public static final String US_EAST_1
public static final long DEFAULT_TIMEOUT
public static final Http.Body EMPTY_BODY
public static okhttp3.MediaType mediaType(String value)
public static okhttp3.OkHttpClient enableJKSCertificates(okhttp3.OkHttpClient httpClient,
String trustStorePath,
String trustStorePassword,
String keyStorePath,
String keyStorePassword)
throws MinioException
MinioExceptionpublic static okhttp3.OkHttpClient enablePKCS12Certificates(okhttp3.OkHttpClient httpClient,
String trustStorePath,
String trustStorePassword,
String keyStorePath,
String keyStorePassword)
throws MinioException
MinioExceptionpublic static okhttp3.OkHttpClient enableExternalCertificates(okhttp3.OkHttpClient client,
String filePath,
String dirPath)
throws MinioException
MinioExceptionpublic static okhttp3.OkHttpClient enableExternalCertificatesFromEnv(okhttp3.OkHttpClient client)
throws MinioException
MinioExceptionpublic static okhttp3.OkHttpClient newDefaultClient()
public static okhttp3.OkHttpClient disableCertCheck(okhttp3.OkHttpClient client)
throws MinioException
MinioExceptionpublic static okhttp3.OkHttpClient setTimeout(okhttp3.OkHttpClient client,
long connectTimeout,
long writeTimeout,
long readTimeout)