equation-sdk
Version:
🛠An SDK for building applications on top of Equation.
22 lines (21 loc) • 1.2 kB
TypeScript
/**
* Sends a GET request to the specified URL with optional query parameters.
* @param {string} url - The URL to send the GET request to.
* @param {object} obj - Optional query parameters as an object.
* @returns {Promise<any>} - A promise that resolves with the response data or rejects with an error.
*/
export declare const get: (url: string, obj?: object) => Promise<unknown>;
/**
* Sends a POST request to the specified URL with the given parameters.
* @param {string} url - The URL to send the request to.
* @param {object} params - The parameters to include in the request.
* @returns {Promise<any>} - A promise that resolves with the response data or rejects with an error.
*/
export declare const post: (url: any, params: any) => Promise<unknown>;
/**
* Sends a POST request to the specified URL with the given parameters in form data format.
* @param {string} url - The URL to send the request to.
* @param {object} params - The parameters to include in the request.
* @returns {Promise<any>} - A promise that resolves with the response data or rejects with an error.
*/
export declare const postFromData: (url: any, params: any) => Promise<unknown>;