I need to do a getJSON() request, but how do I pass authorisation and custom headers?
I am getting issues that the request header is taking the name, bu
The $.getJSON() method is shorthand that does not let you specify advanced options like that. To do that, you need to use the full $.ajax() method.
Notice in the documentation at http://api.jquery.com/jQuery.getJSON/:
This is a shorthand Ajax function, which is equivalent to:
$.ajax({
url: url,
dataType: 'json',
data: data,
success: callback
});
So just use $.ajax() and provide all the extra parameters you need.