Promise based XHR library