@aws-amplify/core
Version:
Core category of aws-amplify
1 lines • 1.88 kB
Source Map (JSON)
{"version":3,"file":"composeServiceApi.mjs","sources":["../../../../src/clients/internal/composeServiceApi.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const composeServiceApi = (transferHandler, serializer, deserializer, defaultConfig) => {\n return async (config, input) => {\n const resolvedConfig = {\n ...defaultConfig,\n ...config,\n };\n // We may want to allow different endpoints from given config(other than region) and input.\n // Currently S3 supports additional `useAccelerateEndpoint` option to use accelerate endpoint.\n const endpoint = await resolvedConfig.endpointResolver(resolvedConfig, input);\n // Unlike AWS SDK clients, a serializer should NOT populate the `host` or `content-length` headers.\n // Both of these headers are prohibited per Spec(https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name).\n // They will be populated automatically by browser, or node-fetch polyfill.\n const request = await serializer(input, endpoint);\n const response = await transferHandler(request, {\n ...resolvedConfig,\n });\n return await deserializer(response);\n };\n};\n"],"names":[],"mappings":"AAAA;AACA;AACY,MAAC,iBAAiB,GAAG,CAAC,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,KAAK;AAC/F,IAAI,OAAO,OAAO,MAAM,EAAE,KAAK,KAAK;AACpC,QAAQ,MAAM,cAAc,GAAG;AAC/B,YAAY,GAAG,aAAa;AAC5B,YAAY,GAAG,MAAM;AACrB,SAAS,CAAC;AACV;AACA;AACA,QAAQ,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,gBAAgB,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;AACtF;AACA;AACA;AACA,QAAQ,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AAC1D,QAAQ,MAAM,QAAQ,GAAG,MAAM,eAAe,CAAC,OAAO,EAAE;AACxD,YAAY,GAAG,cAAc;AAC7B,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO,MAAM,YAAY,CAAC,QAAQ,CAAC,CAAC;AAC5C,KAAK,CAAC;AACN;;;;"}