Class PresignedRequest


  • public abstract class PresignedRequest
    extends Object
    The base class for all presigned requests.

    The isBrowserExecutable method can be used to determine whether this request can be executed by a web browser.

    • Method Detail

      • url

        public URL url()
        The URL that the presigned request will execute against. The isBrowserExecutable method 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.

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object