Removed the else clause when writing the response. There is no reason why an xhr response cannot have xhr.responseTex and xhr.response. When using this library to load pdf's using pdfjs (https://github.com/mozilla/pdf.js/) even though the text response in in xhr.responseText the byte Array is in xhr.response. If we want to use xhook with byte arrays we will need to write to the xhr.response to the facade even if xhr.responseText has data.