Closed PicoCreator closed 2 years ago
Hi, there is a way to customize the endpoint by customizing the HttpClient:
HttpClient hc = new HttpClient() {
final HttpClient c = HttpClient.defaultClient();
@Override
public ResponseInputStream request(URL endpointUrl, String httpMethod, Map<String, String> headers,
byte[] requestBody, int connectTimeoutMs, int readTimeoutMs) throws IOException {
// modify endpoint URL here as you wish
URL u = endpointUrl;
return c.request(u, httpMethod, headers, requestBody, connectTimeoutMs, readTimeoutMs);
}
};
Client s3 = Client //
.s3() //
.regionNone() //
.accessKey("accessKey") //
.secretKey("secretKey") //
.httpClient(hc) //
.build();
What are you connecting to? An Outposts environment or something else? If I know a bit more I can make something easier in the library.
I think the ability to specify a hostname supplier function to the Client builder would do the job. Is that enough for you?
Explicit support for a custom endpoint url is in 0.1.13 on Maven Central now
From the configuration example and code, it seems like the the URL end point cannot be configured directly.
That it must be using the AWS s3 endpoints.