davidmoten / aws-lightweight-client-java

A lightweight java client for the AWS API. Signs requests with AWS Version 4 and offers helpful builders.
Apache License 2.0
29 stars 1 forks source link

support custom base urls in requests #61

Closed davidmoten closed 2 years ago

davidmoten commented 2 years ago

As discussed in #50, this PR adds a new builder method that allows customization of the base URL used for requests:

Client s3 = Client
  .s3()
  .region("ap-southeast-2")
  .accessKey(accessKey)
  .secretKey(secretKey)
  .baseUrlFactory((service, region) -> "https://" + service + ".mine.com/")
  .build();