VICE / ModuleTests / Azure / node_modules / @azure / data-tables / dist-esm / src / cosmosPathPolicy.js
cosmosPathPolicy.js
Raw
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
const cosmosPatchPolicyName = "cosmosPatchPolicy";
export function cosmosPatchPolicy() {
    return {
        name: cosmosPatchPolicyName,
        sendRequest: (request, next) => {
            if (request.method === "PATCH") {
                request.method = "POST";
                request.headers.set("X-HTTP-Method", "MERGE");
            }
            return next(request);
        },
    };
}
//# sourceMappingURL=cosmosPathPolicy.js.map