XMLHttpRequest Object
import Http from './Http'
or
<script type="text/javascript" src="http.js"></script>
then
var http = new Http();
http.get(url = 'string', data = {}).then(res => console.log(res));
new Http().get(url,data);
new Http().post(url,data);
new Http().delete(url,data);
new Http().put(url,data);
new Http().jsonp(url);
Options are set when initializing the Http object.
object
var http = new Http({headers: {"Content-type": "application/x-www-form-urlencoded"}});
http.get(url = 'string', data = {}) .then(res => console.log(res));