UNPKG

@aws-amplify/storage

Version:

Storage category of aws-amplify

10 lines (9 loc) 574 B
import { HttpRequest, HttpResponse, MiddlewareHandler } from '@aws-amplify/core/internals/aws-client-utils'; /** * A middleware that adds the x-amz-content-sha256 header to the request if it is not already present. * It's required for S3 requests in browsers where the request body is sent in 1 chunk. * @see https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html * * @internal */ export declare const contentSha256MiddlewareFactory: () => (next: MiddlewareHandler<HttpRequest, HttpResponse>) => (request: HttpRequest) => Promise<HttpResponse>;