title: responseType property of the XMLHttpRequest to accept multiple values
body: <p>I have a situation where the $http reponseType is dependent on url query parameter. When output-target=html and if I don't mention responseType at all, I am able to get the response in html properly.
  However when output-target=xls, I need to do this, to make it work
  and have responseType set to arraybuffer (<a href="https://stackoverflow.com/questions/22447952/angularjs-http-post-convert-binary-to-excel-file-and-download">to get response in excel</a>)</p>
  
  <p>var blob = new Blob([data], {type: "application/vnd.ms-excel"});</p>
  
  <pre><code> $http({
                      method: 'GET',
                      url: "https://xyz/abc?output-target=" + $scope.outputTarget,
                      headers: {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'},
                      responseType: arraybuffer //for $scope.outputTarget=xls
                  })
  </code></pre>
  
  <p>I need something which will accept all kind of response types. If that option is not available, what is the way around? </p>
  
  <p>I also tried passing function to responseType but that didn't work either. </p>
  
  <pre><code>responseType: (function () {
                          if($scope.outputTarget === "table/excel;page-mode=flow") {
                              var arraybuffer
                              return arraybuffer;
                          } else {return;}
                      })()
  </code></pre>
  
  <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data" rel="nofollow noreferrer">responseType documentation</a></p>