Use abstract XHR for asset requests

Needs tests.