{"version":3,"file":"server.mjs","sources":["../../../src/internals/server.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getAmplifyServerContext, } from '@aws-amplify/core/internals/adapter-core';\nimport { post as internalPost } from '../apis/common/internalPost';\n/**\n * Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize\n * the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:\n * * If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM\n *   auth. You MUST also set 'input.options.signingServiceInfo' option.\n *   * The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are\n *     optional. If omitted, the signing service and region will be inferred from url.\n * * If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.\n * * If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.\n * * If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header.\n *\n * To make the internal post cancellable, you must also call `updateRequestToBeCancellable()` with the promise from\n * internal post call and the abort controller supplied to the internal post call.\n *\n * @internal\n */\nexport const post = (contextSpec, input) => {\n    return internalPost(getAmplifyServerContext(contextSpec).amplify, input);\n};\nexport { cancel, updateRequestToBeCancellable, } from '../apis/common/internalPost';\n"],"names":["internalPost"],"mappings":";;;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,CAAC,WAAW,EAAE,KAAK,KAAK;AAC5C,IAAI,OAAOA,MAAY,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC;AAC5E;;;;"}