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

add Response.exists() method #22

Closed davidmoten closed 3 years ago

davidmoten commented 3 years ago

Enables a use case like:

boolean keyExists = s3.path(bucket, key).method(HttpMethod.HEAD).exists();

Throws if status code is not 2xx or 404.