Advertisement
Guest User

Untitled

a guest
Jul 30th, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.         var oneall_public_key = 'a349ba4a-896d-4726-b7c2-f38e417cc15f';
  3.         var oneall_private_key = '6d2cca60-65e6-4972-89bc-6fa185ba88ba';
  4.         var site_authentication = oneall_public_key + ":" + oneall_private_key;
  5.         var bytes = [];
  6.  
  7.         for (var i = 0; i < site_authentication.length; ++i)    
  8.         bytes.push(site_authentication.charCodeAt(i));
  9.      
  10.         var encoded_site_authentication = btoa(bytes).replace("[\n\r]", "");
  11.          
  12.    
  13.         var resource_uri = 'https://' + oneall_subdomain + ".api.oneall.com"; //+ '/connections.json';
  14.         var result_json = "";    
  15.  
  16.  
  17.         var testHttp = null;
  18.         testHttp = new XMLHttpRequest();
  19.         testHttp.open( "GET", resource_uri, false);
  20.         //testHttp.setRequestHeader("Authorization", "Basic " + encoded_site_authentication);
  21.         testHttp.send();//encoded_site_authentication);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement