/*
* Copyright (C) 2007-2022 Crafter Software Corporation. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3 as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
import { AjaxError, AjaxResponse, AjaxConfig } from 'rxjs/ajax';
import { Observable, ObservableInput } from 'rxjs';
import StandardAction from '../models/StandardAction';
type Headers = Record;
export declare const CONTENT_TYPE_JSON: {
'Content-Type': string;
};
export declare const OMIT_GLOBAL_HEADERS: unique symbol;
export declare function setGlobalHeaders(props: object): void;
export declare function removeGlobalHeaders(...headersToDelete: string[]): void;
export declare function getGlobalHeaders(): Record;
export declare function get(url: string, headers?: Headers): Observable>;
export declare function getText(url: string, headers?: Headers): Observable>;
export declare function getBinary(
url: string,
headers?: Headers,
responseType?: XMLHttpRequestResponseType
): Observable>;
export declare function post(url: string, body?: any, headers?: Headers): Observable>;
export declare function postJSON(url: string, body: any, headers?: Headers): Observable>;
export declare function patch(url: string, body: any, headers?: Headers): Observable>;
export declare function patchJSON(url: string, body: any, headers?: Headers): Observable>;
export declare function put(url: string, body: any, headers?: Headers): Observable>;
export declare function del(url: string, headers?: Headers): Observable>;
declare function ajaxWithCrafterHeaders(url: string): Observable>;
declare function ajaxWithCrafterHeaders(request: AjaxConfig): Observable>;
export { ajaxWithCrafterHeaders as ajax };
export declare const catchAjaxError: (
fetchFailedCreator: any,
...moreActionCreators: Array<(error: Partial) => StandardAction>
) => import('rxjs').OperatorFunction;
export declare const errorSelectorApi1: >(err: any, caught: Observable) => O;