Rally Software

  • 1.  Connect Rally Web Services API in Jquery without Node.js

    Posted Jan 24, 2017 04:10 PM

    I am try to access Rally api by using ajax Jquery. So how I don't figure out how to add proxy server info, personal login and token in .ajax. Currently I got error 401 error, as there is proxy server in betweens. my code as below.

    adminUn = rallyuser;adminPw = rallytoken;var tok = adminUn + ':' + adminPw;var hash = Base64.encode(tok);var authCredentials = "Basic " + hash;function jQueryGetMethod (url, data) { $.ajax({   url: url,   type: 'GET', // The HTTP Method   mimeType: 'application/javascript',   datatype: 'json',   error: function(err) { alert(err); },   complete: function(xhr) {     if (xhr.status === 200) {       repositories = xhr.responseJSON;       outputPageContent(); } else {     alert('Request failed.  Returned status of ' + xhr.status); }   },   error: function( req, status, err ) { console.log( 'something went wrong', status, err ); },   beforeSend: function(xhr, settings) { xhr.setRequestHeader('Authorization',authCredentials);       xhr.setRequestHeader('Content-Type', 'text/plain');} });


  • 2.  Re: Connect Rally Web Services API in Jquery without Node.js

    Posted Feb 16, 2017 06:52 PM

    Hi Qi,

    I think you would get the best response posting in stackoverflow. It sounds like node.js does not use the http_proxy environment variable in Linux/UNIX environments.

    Stack Overflow 

     

    Thanks,

    Sean Davis