hi
in a user macro , i’m trying to make an ajax call (a simple get for now) to a third party API REST with authentication
my code is kind of:
.
.
.
#set($D=‘$’)
<script type=“text/javascript”>
function myfunction()
{
var myURL=“my url starting with 'http://user:password@XXXXXXXXXXXXXXX”;
var myjson;
AJS.${D}.ajax({
type: ‘get’,
dataType: “json”,
async: false,
url: myURL,
success: function(data) {
myjson = data.entities;
}
});
return myjson ;
}
</script>
in return i dont get anything and in the web console i got theses warnings:
DEPRECATED JS - Cookie has been deprecated since 5.8.0 and will be removed in a future release. Use cookie instead.
DEPRECATED JS - Dialog has been deprecated since 6.0.6 and will be removed in a future release. Use require(‘confluence-create-content/space-blueprint’) /contextbatch/js/_super/batch.js?locale=en-GB:639:134
any ideas
Thank you