/**
 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
 * @version v23.1.0
 * @link http://www.ag-grid.com/
 * @license MIT
 */
import { Promise } from "../utils";
export function simpleHttpRequest(params) {
    return new Promise(function (resolve) {
        var httpRequest = new XMLHttpRequest();
        httpRequest.open('GET', params.url);
        httpRequest.send();
        httpRequest.onreadystatechange = function () {
            if (httpRequest.readyState == 4 && httpRequest.status == 200) {
                var httpResponse = JSON.parse(httpRequest.responseText);
                resolve(httpResponse);
            }
        };
    });
}
