beginning of XMLHttpRequest mock