@azure/storage-file-datalake
Version:
Microsoft Azure Storage SDK for JavaScript - DataLake
38 lines • 1.49 kB
JavaScript
;
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.StorageContextClient = void 0;
const core_util_1 = require("@azure/core-util");
const index_js_1 = require("./generated/src/index.js");
/**
* @internal
*/
class StorageContextClient extends index_js_1.StorageClient {
async sendOperationRequest(operationArguments, operationSpec) {
const operationSpecToSend = { ...operationSpec };
if (!core_util_1.isNodeLike &&
!operationSpec.requestBody &&
operationSpec.headerParameters?.some((param) => param.mapper.serializedName === "Content-Length")) {
operationSpecToSend.mediaType = "text";
operationSpecToSend.requestBody = {
parameterPath: "body",
mapper: {
serializedName: "body",
isConstant: true,
defaultValue: "",
type: {
name: "String",
},
},
};
}
if (operationSpecToSend.path === "/{filesystem}" ||
operationSpecToSend.path === "/{filesystem}/{path}") {
operationSpecToSend.path = "";
}
return super.sendOperationRequest(operationArguments, operationSpecToSend);
}
}
exports.StorageContextClient = StorageContextClient;
//# sourceMappingURL=StorageContextClient.js.map