@mikezimm/fps-library-v2
Version:
Library of reusable typescript/javascript functions, interfaces and constants
23 lines (22 loc) • 1.54 kB
TypeScript
import { SPHttpClient, ISPHttpClientOptions } from '@microsoft/sp-http';
import { IFpsSpHttpServiceMIN } from '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/Sp/IFpsSpHttpServiceMIN';
import { ISPHttpClientResponse } from '@mikezimm/fps-core-v7/lib/types/@msft/1.17.3/ISPHttpClientResponse';
/**
* RequestInit:
This is a general TypeScript interface for the native JavaScript fetch API. It is a standard part of the web API for making HTTP requests and is not specific to SharePoint.
It includes properties like method, headers, body, mode, credentials, etc.
It's typically used when working directly with the fetch function, and it is a very general-purpose object.
ISPHttpClientOptions:
This is SharePoint Framework (SPFx)-specific. It extends RequestInit with additional SPFx-specific properties.
It is specifically used in the SPHttpClient to make requests to SharePoint REST APIs.
For example, it includes properties like headers and method but also supports features specific to SPFx, such as headers that integrate with SharePoint-specific behaviors (like authorization).
*/
export default class FpsSpHttpService implements IFpsSpHttpServiceMIN {
private spHttpClient;
constructor(spHttpClient: SPHttpClient);
readonly PackageLibV2: string;
readonly PackageCoreV7: string;
readonly PackageStyles: string;
fpsFetch(apiEndpoint: string, options: ISPHttpClientOptions): Promise<ISPHttpClientResponse>;
}
//# sourceMappingURL=FpsSpHttpService.d.ts.map