@microsoft/kiota-abstractions
Version:
Core abstractions for kiota generated libraries in TypeScript and JavaScript
18 lines • 1.04 kB
TypeScript
/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { type ErrorMappings } from "./requestAdapter.js";
/** Defines the contract for a response handler. */
export interface ResponseHandler {
/**
* Callback method that is invoked when a response is received.
* @param response The native response object.
* @param errorMappings the error factories mapping to use in case of a failed request.
* @returns A {@link Promise} that represents the asynchronous operation and contains the deserialized response.
*/
handleResponse<NativeResponseType, ModelType>(response: NativeResponseType, errorMappings: ErrorMappings | undefined): Promise<ModelType | undefined>;
}
//# sourceMappingURL=responseHandler.d.ts.map