import { IConnection } from "./IConnection"; import { IFetchRoute } from "./IFetchRoute"; import { IPropagation } from "./IPropagation"; /** * Utility class for `fetch` functions used in `@nestia/sdk`. * * `PlainFetcher` is a utility class designed for SDK functions generated by * [`@nestia/sdk`](https://nestia.io/docs/sdk/sdk), interacting with the remote * HTTP sever API. In other words, this is a collection of dedicated `fetch()` * functions for `@nestia/sdk`. * * For reference, `PlainFetcher` class does not encrypt or decrypt the body data * at all. It just delivers plain data without any post processing. If you've * defined a controller method through `@EncryptedRoute` or `@EncryptedBody` * decorator, then {@liink EncryptedFetcher} class would be used instead. * * @author Jeongho Nam - https://github.com/samchon */ export declare namespace PlainFetcher { /** * Fetch function only for `HEAD` method. * * @param connection Connection information for the remote HTTP server * @param route Route information about the target API * @returns Nothing because of `HEAD` method */ function fetch(connection: IConnection, route: IFetchRoute<"HEAD">): Promise; /** * Fetch function only for `GET` method. * * @param connection Connection information for the remote HTTP server * @param route Route information about the target API * @returns Response body data from the remote API */ function fetch(connection: IConnection, route: IFetchRoute<"GET">): Promise; /** * Fetch function for the `POST`, `PUT`, `PATCH` and `DELETE` methods. * * @param connection Connection information for the remote HTTP server * @param route Route information about the target API * @returns Response body data from the remote API */ function fetch(connection: IConnection, route: IFetchRoute<"POST" | "PUT" | "PATCH" | "DELETE">, input?: Input, stringify?: (input: Input) => string): Promise; function propagate>(connection: IConnection, route: IFetchRoute<"GET" | "HEAD">): Promise; function propagate>(connection: IConnection, route: IFetchRoute<"DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT">, input?: Input, stringify?: (input: Input) => string): Promise; }