Make this a drop-in replacement for xmlhttprequest.