Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-5965

XHR with responseType other than 'text' calls fail on WP8

    XMLWordPrintableJSON

Details

    Description

      responseType in XHR calls is ignored,

      for example setting it to 'arraybuffer' or 'blob' fails on Windows Phone 8 because the value is not being propagated into "wrappedXHR" as well as there is no 'response' property in the wrappedXHR Object.

      The workaround is to use xhr.wrappedXHR.response instead or add into XHRHelper.cs:

      Object.defineProperty(this, 'responseType', {
          set: function(val) {
              this.wrappedXHR.responseType = val;
          }
      });
      Object.defineProperty(this, 'response', {
          get: function() {
              return this.wrappedXHR.response;
          }
      });
      

      Attachments

        Activity

          People

            purplecabbage Jesse MacFadyen
            pplewa Piotr Plewa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: