| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
The abort() method of the AbortController interface aborts a DOM request (e.g. a Fetch request)
References -
import { Client,FetchOptions } from "@microsoft/microsoft-graph-client";
import { AbortController } from "abort-controller"; // <- import when using the abort-controller npm package.
const controller = new AbortController();
const timeout = setTimeout(() => {
controller.abort();
}, 150);
const fetchOptions: FetchOptions = {
signal: controller.signal;
}
const client = Client.initWithMiddleware({
fetchOptions, // Pass the FetchOptions value where the AbortController.signal is set
authProvider,
...
});| Back | FazBrowse Home | New Git URL |