cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
624
Views
0
Helpful
0
Replies

MSE and AJAX

idsinteractive
Level 1
Level 1

I am trying to connect to our MSE install via AJAX. I can connect and get results for a call via the Chrome REST plugin just fine. But via AJAX i get authentication issues. Any advice? Below is my code with fake IP and user:pass...

var url = 'https://myip/api/contextaware/v1/maps/count'; // just calling a simple call directly

var auth = 'Basic 12345abcdef';

$.ajax({

  url : url,

  method : 'GET',

  beforeSend : function(req) {

    req.setRequestHeader('Authorization', auth);

  },

  success: function(response){

    alert('Yes');

  },

  error: function (request, status, error) {

    alert('No');

  }

});

Result: 401 Not Authorized

0 Replies 0
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card