Hi,
I have a REST call to retrieve the profile of the current user in javascript
$(function () {
getUserInfo();
function getUserInfo() {
var theData = ""
var requestHeaders = {
"Accept": "application/json;odata=verbose",
"X-RequestDigest": jQuery("#__REQUESTDIGEST").val()
};
jQuery.ajax({
url:_spPageContextInfo.webAbsoluteUrl+ "/_api/SP.UserProfiles.PeopleManager/GetMyProperties",
type:"GET",
data: JSON.stringify(theData),
contentType : "application/json;odata=verbose",
headers: requestHeaders,
success:function(data){
succesCall(data);
},
error:function(jqxr,errorCode,errorThrown){
errorCall();
}
});
}
function errorCall() {
console.log('this is a fail');
}
function succesCall(data) {
console.log('succes');
}
});
When I use this code on my local development server it returns exactly what I want. But when I add this code on a page in a https site then I get an Internal Server Error. On this same site I have different REST Calls that query lists on the site, that work perfectly.
Does anyone know what I need to change to get this working on a https site?
Thanks in advance
Ronald