@microsoft/msgraph-sdk-core
Version:
Core functionalities for the Microsoft Graph JavaScript SDK
22 lines • 938 B
JavaScript
import { HttpClient } from "@microsoft/kiota-http-fetchlibrary";
import { getDefaultMiddlewares } from "../middleware/index.js";
/**
* Specialized version of the HTTP client for the Graph API that bootstraps telemetry, /me replacement, and other aspects
*/
export class GraphHttpClient extends HttpClient {
/**
* Creates a new instance of the GraphHttpClient class
* @param graphTelemetryOption The options for telemetry
* @param customFetch The custom fetch implementation to use
* @param middlewares The middlewares to use
*/
constructor(graphTelemetryOption, customFetch, ...middlewares) {
super(customFetch, ...((middlewares !== null && middlewares !== void 0 ? middlewares : []).length > 0
? middlewares
: getDefaultMiddlewares({
customFetch,
graphTelemetryOption,
})));
}
}
//# sourceMappingURL=GraphHttpClient.js.map