@mikezimm/fps-core-v7
Version:
Library of reusable core interfaces, types and constants migrated from fps-library-v2
20 lines (19 loc) • 892 B
TypeScript
/**
* Generated from ChatGPT Query... UNTESTED as of 2024-09-29.
* NOTE:
*
* Usage:
getFormDigestValue("https://your-sharepoint-site-url")
.then(digestValue => {
console.log("Form Digest Value:", digestValue);
});
* Fetch Request NOTES:
Method: A POST request is sent to retrieve the context information.
Headers: The request includes the Accept and Content-Type headers. If you're already on a SharePoint page and have access to the __REQUESTDIGEST hidden input, you can include it, though it's optional for this request.
Credentials: Setting credentials: 'include' ensures that cookies (authentication) are sent with the request.
*
* @param siteUrl
* @returns
*/
export declare function getFormDigestValueNoContext(siteUrl: string): Promise<string>;
//# sourceMappingURL=getFormDigestValueNoContext.d.ts.map