import type { FetchRequestInit } from '../definitions/interfaces.js'; import type { FetchRequestInfo } from '../definitions/types.js'; import { FetchError } from './fetch-error.js'; import { FetchResponse } from './fetch-response.js'; /** * The Fetch class is built on top of the native Fetch API and it is isomorphic, which means that it can be used in both Node.js and browsers. * * - The body and headers of the request are automatically generated based on the body. * - The body of the response is dynamically parsed based on the Content-Type header, unless the parse option is set to false. * - Enabling logs will give you a detailed overview of the requests and responses. * * [Aracna Reference](https://aracna.dariosechi.it/core/classes/fetch) */ export declare class Fetch { /** * Sends a request. */ static send(input: FetchRequestInfo, init?: FetchRequestInit): Promise | FetchError>; /** * Sends a CONNECT request. */ static connect(input: FetchRequestInfo, init?: FetchRequestInit): Promise | FetchError>; /** * Sends a DELETE request. */ static delete(input: FetchRequestInfo, body?: V, init?: FetchRequestInit): Promise | FetchError>; /** * Sends a GET request. */ static get(input: FetchRequestInfo, init?: FetchRequestInit): Promise | FetchError>; /** * Sends a HEAD request. */ static head(input: FetchRequestInfo, init?: FetchRequestInit): Promise; /** * Sends a OPTIONS request. */ static options(input: FetchRequestInfo, init?: FetchRequestInit): Promise | FetchError>; /** * Sends a PATCH request. */ static patch(input: FetchRequestInfo, body?: V, init?: FetchRequestInit): Promise | FetchError>; /** * Sends a POST request. */ static post(input: FetchRequestInfo, body?: V, init?: FetchRequestInit): Promise | FetchError>; /** * Sends a PUT request. */ static put(input: FetchRequestInfo, body?: V, init?: FetchRequestInit): Promise; /** * Sends a TRACE request. */ static trace(input: FetchRequestInfo, init?: FetchRequestInit): Promise; }