AP.require(‘request’, function(request) {
function getFile(path) {
var x = request({
url: '/1.0/repositories/{}/' + repoUuid + '/raw/HEAD/' + path,
success: function (data) {
console.log(data)
console.log(x)
},
error: function (i) {
console.log("err", i)
}
})
})
In the above code, the “data” parameter is always undefined. When i check the network tab in chrome, I can see the file getting served.