Class AbstractStreamingRequestMarshaller<T>

    • Field Detail

      • delegateMarshaller

        protected final Marshaller<T> delegateMarshaller
      • requiresLength

        protected final boolean requiresLength
      • transferEncoding

        protected final boolean transferEncoding
      • useHttp2

        protected final boolean useHttp2
    • Method Detail

      • addHeaders

        protected final void addHeaders​(SdkHttpFullRequest.Builder marshalled,
                                        Optional<Long> contentLength,
                                        boolean requiresLength,
                                        boolean transferEncoding,
                                        boolean useHttp2)
        This method will run certain validations for content-length and add additional headers (like Transfer-Encoding) if necessary. If requiresLength and transferEncoding is not set to true and Content Length is missing, SDK is not required to calculate the Content-Length and delegate that behavior to the underlying http client.
        Parameters:
        marshalled - A mutable builder for SdkHttpFullRequest representing a HTTP request.
        contentLength - Optional of content length
        requiresLength - True if Content-Length header is required on the request
        transferEncoding - True if "Transfer-Encoding: chunked" header should be set on request
        useHttp2 - True if the operation uses http2