XHR API: allow arbitrary number of args