import { Emitters as JsApiEmitters, HttpClient as JsApiHttpClient, EventEmitterInstance, EventEmitterEvents } from '@alfresco/js-api'; import { RequestOptions, SecurityOptions } from './interfaces'; import * as i0 from "@angular/core"; export interface Emitters { readonly eventEmitter: EventEmitterInstance; readonly apiClientEmitter: EventEmitterInstance; } export declare class AdfHttpClient implements JsApiHttpClient { private readonly httpClient; private readonly eventEmitter; _disableCsrf: boolean; get disableCsrf(): boolean; set disableCsrf(disableCsrf: boolean); private defaultSecurityOptions; on(event: EventEmitterEvents, fn: (...args: any[]) => void, context?: any): this; off(event: EventEmitterEvents, fn?: (...args: any[]) => void, context?: any): this; once(event: EventEmitterEvents, fn: (...args: any[]) => void, context?: any): this; emit(event: EventEmitterEvents, ...args: any[]): boolean; setDefaultSecurityOption(options: any): void; merge(...objects: any[]): any; request(url: string, options?: RequestOptions, sc?: SecurityOptions, emitters?: JsApiEmitters): Promise; post(url: string, options?: RequestOptions, sc?: SecurityOptions, emitters?: JsApiEmitters): Promise; put(url: string, options?: RequestOptions, sc?: SecurityOptions, emitters?: JsApiEmitters): Promise; get(url: string, options?: RequestOptions, sc?: SecurityOptions, emitters?: JsApiEmitters): Promise; delete(url: string, options?: RequestOptions, sc?: SecurityOptions, emitters?: JsApiEmitters): Promise; private addPromiseListeners; private getEventEmitters; private requestWithLegacyEventEmitters; private static getBody; private getHeaders; /** * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first. * * @param contentTypes a contentType array * @returns The chosen content type, preferring JSON. */ private static jsonPreferredMime; /** * Checks whether the given content type represents JSON.
* JSON content type examples:
*
    *
  • application/json
  • *
  • application/json; charset=UTF8
  • *
  • APPLICATION/JSON
  • *
* * @param contentType The MIME content type to check. * @returns true if contentType represents JSON, otherwise false. */ private static isJsonMime; private setCsrfToken; private createCSRFToken; private static getSecureRandomValue; private static getResponseType; /** * Deserialize an HTTP response body into a value of the specified type. * * @param response response object * @param returnType return type * @returns deserialized object */ private static deserialize; private static deserializeBlobResponse; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }