UNPKG

@iabtechlabtcf/core

Version:

Ensures consistent encoding and decoding of TC Signals for the iab. Transparency and Consent Framework (TCF).

21 lines (20 loc) 960 B
export declare class Json { private static absCall; /** * @static * @param {string} url - full path to POST to * @param {object} body - JSON object to post * @param {boolean} sendCookies - Whether or not to send the XMLHttpRequest with credentials or not * @param {number} [timeout] - optional timeout in milliseconds * @return {Promise<object>} - if the server responds the response will be returned here */ static post(url: string, body: object, sendCookies?: boolean, timeout?: number): Promise<object>; /** * @static * @param {string} url - full path to the json * @param {boolean} sendCookies - Whether or not to send the XMLHttpRequest with credentials or not * @param {number} [timeout] - optional timeout in milliseconds * @return {Promise<object>} - resolves with parsed JSON */ static fetch(url: string, sendCookies?: boolean, timeout?: number): Promise<object>; }