import HttpClientConfiguration, { type IHttpClientConfiguration } from '../httpClient/HttpClientConfiguration'; /** * Flags interface for SPHttpClientCommonConfiguration * * @public */ export interface ISPHttpClientCommonConfiguration extends IHttpClientConfiguration { /** * Automatically configure the "Content-Type" header for a JSON payload. * * @remarks * When this switch is true: * * If the "Content-Type" header was not explicitly added for the request, * then SPHttpClient will add it if the request is a write operation (i.e. * an HTTP method other than "GET", "HEAD", or "OPTIONS"). * * For OData 3.0, the value is 'application/json;odata=verbose;charset=utf-8'. * * For OData 4.0, the value is 'application/json;charset=utf-8'. */ jsonRequest?: boolean; /** * Automatically configure the "Accept" header for a JSON payload. * * @remarks * When this switch is true: * * If the "Accept" header was not explicitly added for the request, * then SPHttpClient will add it. * * For OData 3.0, the value is 'application/json'. * * For OData 4.0, the value is 'application/json;odata.metadata=minimal'. */ jsonResponse?: boolean; /** * Handle cookie refresh with a popup dialog * * @remarks * When this switch is true popup auth will be used for handling a cookie refresh. * This means the caller must handle the popup events. If it is undefined or false * full page redirect will be defaulted to. */ usePopupForCookieRefresh?: boolean; } /** * Common base class for SPHttpClientConfiguration and SPHttpClientBatchConfiguration. * * @public */ export default class SPHttpClientCommonConfiguration extends HttpClientConfiguration implements ISPHttpClientCommonConfiguration { protected flags: ISPHttpClientCommonConfiguration; /** * Constructs a new instance of SPHttpClientCommonConfiguration with the specified flags. * * @remarks * The default values will be used for any flags that are missing or undefined. * If overrideFlags is specified, it takes precedence over flags. */ constructor(flags: ISPHttpClientCommonConfiguration, overrideFlags?: ISPHttpClientCommonConfiguration); /** * @override */ overrideWith(sourceFlags: ISPHttpClientCommonConfiguration): SPHttpClientCommonConfiguration; /** * {@inheritDoc ISPHttpClientCommonConfiguration.jsonRequest} */ get jsonRequest(): boolean; /** * {@inheritDoc ISPHttpClientCommonConfiguration.jsonResponse} */ get jsonResponse(): boolean; /** * @override */ protected initializeFlags(): void; } //# sourceMappingURL=SPHttpClientCommonConfiguration.d.ts.map