XHR utils.