Package io.minio
Class Http
java.lang.Object
io.minio.Http
HTTP utilities.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBase URL of S3 endpoint.static classstatic classHTTP headers.static enumHTTP methods.static classHTTP query parameters.static classHTTP request.static classHTTP request body ofRandomAccessFile,ByteBufferor byte array.static classS3 request.static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic okhttp3.OkHttpClientdisableCertCheck(okhttp3.OkHttpClient client) Disables TLS certificate check as a special case for self-signed certificate and testing to the specified HTTP client.static okhttp3.OkHttpClientenableExternalCertificates(okhttp3.OkHttpClient client, String filePath, String dirPath) Enable external TLS certificates from given file path and all valid files from dir path.static okhttp3.OkHttpClientenableExternalCertificatesFromEnv(okhttp3.OkHttpClient client) Enables external TLS certificates from SSL_CERT_FILE and SSL_CERT_DIR environment variables if present.static okhttp3.OkHttpClientenableJKSCertificates(okhttp3.OkHttpClient httpClient, String trustStorePath, String trustStorePassword, String keyStorePath, String keyStorePassword) Enables JKS formatted TLS certificates to the specified HTTP client.static okhttp3.OkHttpClientenablePKCS12Certificates(okhttp3.OkHttpClient httpClient, String trustStorePath, String trustStorePassword, String keyStorePath, String keyStorePassword) Enables PKCS12 formatted TLS certificates to the specified HTTP client.static StringgetRequestTraces(okhttp3.Request request, String bodyString) static StringgetResponseTraces(okhttp3.Response response, Http.Method method, Http.QueryParameters queryParams, boolean isBucketRequest) static okhttp3.MediaTypeGets media type of the specified string value.static okhttp3.OkHttpClientCreates new HTTP client with default timeout with additional TLS certificates from SSL_CERT_FILE and SSL_CERT_DIR environment variables if present.static okhttp3.OkHttpClientsetTimeout(okhttp3.OkHttpClient client, long connectTimeout, long writeTimeout, long readTimeout) Sets connect, write and read timeout in milliseconds to the specified HTTP client.
-
Field Details
-
DEFAULT_MEDIA_TYPE
public static final okhttp3.MediaType DEFAULT_MEDIA_TYPE -
XML_MEDIA_TYPE
public static final okhttp3.MediaType XML_MEDIA_TYPE -
JSON_MEDIA_TYPE
public static final okhttp3.MediaType JSON_MEDIA_TYPE -
US_EAST_1
- See Also:
-
DEFAULT_TIMEOUT
public static final long DEFAULT_TIMEOUT -
EMPTY_BODY
-
RETRIABLE_STATUS_CODES
-
END_HTTP
- See Also:
-
UPLOAD_ID
- See Also:
-
TRACE_QUERY_PARAMS
-
-
Constructor Details
-
Http
public Http()
-
-
Method Details
-
mediaType
Gets media type of the specified string value. -
enableJKSCertificates
public static okhttp3.OkHttpClient enableJKSCertificates(okhttp3.OkHttpClient httpClient, String trustStorePath, String trustStorePassword, String keyStorePath, String keyStorePassword) throws MinioException Enables JKS formatted TLS certificates to the specified HTTP client.- Throws:
MinioException
-
enablePKCS12Certificates
public static okhttp3.OkHttpClient enablePKCS12Certificates(okhttp3.OkHttpClient httpClient, String trustStorePath, String trustStorePassword, String keyStorePath, String keyStorePassword) throws MinioException Enables PKCS12 formatted TLS certificates to the specified HTTP client.- Throws:
MinioException
-
enableExternalCertificates
public static okhttp3.OkHttpClient enableExternalCertificates(okhttp3.OkHttpClient client, String filePath, String dirPath) throws MinioException Enable external TLS certificates from given file path and all valid files from dir path.- Throws:
MinioException
-
enableExternalCertificatesFromEnv
public static okhttp3.OkHttpClient enableExternalCertificatesFromEnv(okhttp3.OkHttpClient client) throws MinioException Enables external TLS certificates from SSL_CERT_FILE and SSL_CERT_DIR environment variables if present.- Throws:
MinioException
-
getRequestTraces
-
getResponseTraces
public static String getResponseTraces(okhttp3.Response response, Http.Method method, Http.QueryParameters queryParams, boolean isBucketRequest) throws IOException - Throws:
IOException
-
newDefaultClient
public 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. -
disableCertCheck
public static okhttp3.OkHttpClient disableCertCheck(okhttp3.OkHttpClient client) throws MinioException Disables TLS certificate check as a special case for self-signed certificate and testing to the specified HTTP client.- Throws:
MinioException
-
setTimeout
public 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.
-