title: UrlFetch Status code 200 OK but response showing 'unsupported browser'
body: <p>I have setup a daily trigger for the below function to login using Basic Authentication to my company provided url and download a JSON response into a Google Spreadsheet. Later i will parse this response into a spreadsheet table. </p>
  
  <p>The Response code is coming as 200 OK, but the response text shows ERROR and has <strong>'unsupported-Browser'</strong> mentioned in the returned html response.</p>
  
  <pre><code>function test1(){
    var url = "https://some.website.com/path1/path2/path3/";
    var user = 'test123@test.com';
    var pwd = 'mypass123';
  
    var res = UrlFetchApp.fetch(url, {
      'headers': {
        'SMAGENTNAME' : '-SM-uL9Ydk9ZgPvYi+geshsOjQi7kbevUvOTmZvMksmphUle4s7h0Mx4uhOXXq/8JSBQ06Y',
        'Authorization': 'Basic ' + Utilities.base64Encode(user + ':' + pwd, Utilities.Charset.UTF_8)
      }
      });      
    Logger.log(res.getResponseCode());
    Logger.log(res.getContentText());
  }
  </code></pre>
  
  <p>I am getting the following html response:</p>
  
  <pre><code>    ...&lt;/head&gt;
  
  &lt;body ng-init="errorMessage=''; errorTitle='ERROR'; appName='ABC'; browserLocale='null'; requireCorpCred=false;downTimeNotificationSvc=''; targetUrl='https://abc.something.xxx.com/portal/site/something'; userNameType='text'; passwordType='text'; "&gt;
      &lt;div ng-controller="LoginController as vm" class="login-background container-fluid" data-ng-cloak&gt;
          &lt;xxx-cookie-policy&gt;&lt;/xxx-cookie-policy&gt;
          &lt;div class="row auth-body" ng-style="{'background-image':'url({{vm.backgroundImg}})'}"&gt;
              &lt;xxx-unsupported-browser&gt;&lt;/xxx-unsupported-browser&gt;
              &lt;div class="auth-section col-xl-3 col-md-3 col-sm-11 col-xs-12"&gt;
                  &lt;a class="help" data-ng-click="vm.gotoSupportPage()"&gt;
                      &lt;i class="xxx-icon xxx-icon-help"&gt;&lt;/i&gt;
                  &lt;/a&gt;.......
  </code></pre>
  
  <p>I found online that some servers only allow recognized browsers. Our company site uses SiteMinder authentication layer. I guess Google Appsscript is not recognized as a browser and it also does not allow customization or spoofing of its <strong>User-Agent</strong>. </p>
  
  <p>Is there a workaround to download the response?</p>