尝试在SMP中注册用户时遇到这些错误。 403禁止
请帮助我解决此问题。
var person={user:"",password:""};
$.ajax({ url: 'http://*****/***/applications/***/******/Connections',
type: 'post',
contentType:application/xml',
headers: {
'Content-Type':'application/xml',
'contentType': 'application/xml',
'Authorization': 'Basic '+btoa(person.user + ':' + person.password)
},
data:'<?xml version="1.0" encoding="UTF-8"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <content type="application/xml"> <m:properties> <d:DeviceType>iPhone</d:DeviceType> </m:properties> </content></entry>',
success: function (response, status, xhr) {
alert(status);
},
error: function ( xhr, ajaxOptions, thrownError) {
console.log(xhr)
console.log(thrownError)
alert("Local error callback.");
},
});