Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrofsantoscom authored Jun 8, 2021
1 parent 9ccbcc5 commit ca5e1ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/browser/browser-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ function sendRequestXhr(request, xhr) {
function createRequestXhr(request, accessToken) {
var url = request.url(accessToken);
var xhr = new window.XMLHttpRequest();
xhr.responseType = ["arraybuffer", "blob", "document", "json", "text"].includes(request.responseType) ? request.responseType : ""

xhr.open(request.method, url);
Object.keys(request.headers).forEach(function(key) {
xhr.setRequestHeader(key, request.headers[key]);
Expand Down

0 comments on commit ca5e1ea

Please sign in to comment.