@microsoft/kiota-abstractions
Version:
Core abstractions for kiota generated libraries in TypeScript and JavaScript
23 lines • 1.13 kB
JavaScript
var _a;
/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { NativeResponseHandler } from "./nativeResponseHandler.js";
/** This class can be used to wrap a request using the fluent API and get the native response object in return. */
export class NativeResponseWrapper {
}
_a = NativeResponseWrapper;
NativeResponseWrapper.CallAndGetNative = async (originalCall, q, h, o) => {
const responseHandler = new NativeResponseHandler();
await originalCall(q, h, o, responseHandler);
return responseHandler.value;
};
NativeResponseWrapper.CallAndGetNativeWithBody = async (originalCall, requestBody, q, h, o) => {
const responseHandler = new NativeResponseHandler();
await originalCall(requestBody, q, h, o, responseHandler);
return responseHandler.value;
};
//# sourceMappingURL=nativeResponseWrapper.js.map