Class PresignedRequest
- java.lang.Object
-
- software.amazon.awssdk.awscore.presigner.PresignedRequest
-
public abstract class PresignedRequest extends Object
The base class for all presigned requests. TheisBrowserExecutablemethod can be used to determine whether this request can be executed by a web browser.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePresignedRequest.Builderprotected static classPresignedRequest.DefaultBuilder<B extends PresignedRequest.DefaultBuilder<B>>
-
Constructor Summary
Constructors Modifier Constructor Description protectedPresignedRequest(PresignedRequest.DefaultBuilder<?> builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Instantexpiration()The exact SERVICE time that the request will expire.inthashCode()SdkHttpRequesthttpRequest()The entire SigV4 query-parameter signed request (minus the payload), that can be transmitted as-is to a service using any HTTP client that implement the SDK's HTTP client SPI.booleanisBrowserExecutable()Whether the url returned by the url method can be executed in a browser.Map<String,List<String>>signedHeaders()Returns the subset of headers that were signed, and MUST be included in the presigned request to prevent the request from failing.Optional<SdkBytes>signedPayload()Returns the payload that was signed, or Optional.empty() if there is no signed payload with this request.URLurl()The URL that the presigned request will execute against.
-
-
-
Constructor Detail
-
PresignedRequest
protected PresignedRequest(PresignedRequest.DefaultBuilder<?> builder)
-
-
Method Detail
-
url
public URL url()
The URL that the presigned request will execute against. TheisBrowserExecutablemethod can be used to determine whether this request will work in a browser.
-
expiration
public Instant expiration()
The exact SERVICE time that the request will expire. After this time, attempting to execute the request will fail. This may differ from the local clock, based on the skew between the local and AWS service clocks.
-
isBrowserExecutable
public boolean isBrowserExecutable()
Whether the url returned by the url method can be executed in a browser. This is true when the HTTP request method is GET and all data included in the signature will be sent by a standard web browser.
-
signedHeaders
public Map<String,List<String>> signedHeaders()
Returns the subset of headers that were signed, and MUST be included in the presigned request to prevent the request from failing.
-
signedPayload
public Optional<SdkBytes> signedPayload()
Returns the payload that was signed, or Optional.empty() if there is no signed payload with this request.
-
httpRequest
public SdkHttpRequest httpRequest()
The entire SigV4 query-parameter signed request (minus the payload), that can be transmitted as-is to a service using any HTTP client that implement the SDK's HTTP client SPI.This request includes signed AND unsigned headers.
-
-