Browser-request replace with native XMLHttpRequest