import type { NetworkResponse, RequestOptions } from '../types'; /** * http client for browsers. Will attempt to use a CORS capable implementation * if available. * * @param {Object} options * @param {string} options.url The url of the request. * @param {string} [options.method] The HTTP method to use, ie, GET, POST, etc. * @param {Object} [options.data] The data to send with the request. For JSONP * and methods that do not support bodies, data * will be converted to URL parameters, otherwise * sent as the body for applicable HTTP methods. * @param {Object} [options.headers] HTTP headers to be sent with the request. * @param {boolean} [options.envelope=false] Default false. Fallback to using envelope * based POST requests (for all HTTP methods). * Use this to avoid leaking sensitive data in query * strings for envelope and JSONP requests. */ export default function request(options: RequestOptions): Promise>;