An XHR library that is using proxy object and returns promise as the response of the server.
"use strict";
const xhrAPI = require(xhrapi);
const options = {
query: "anyQuery", // {"key1": "value2", "key2": "value2"}
header: {"anyType": "anyHeader"},
data: "anyData" // array or object
};
xhrAPI.anyMethod("url", options);
sinon.js and jest testing frameworks were used for testing this library. To run the test, enter npm t command to the terminal.