You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to extend this library to support the AQL API call. Here's what I've done so far:
ArtifactoryAPI.prototype.AQLSearch = function (searchParams) {
var deferred = Q.defer();
var options = {
url: this.url_ + '/api/search/aql',
headers: {
'Authorization': 'Basic ' + this.basicHttpAuth_
},
strictSSL: false,
body: searchParams
};
request.post(options, function (error, response) {
if (error) {
deferred.reject(error.message);
return;
}
//We expect an OK return code.
if (response.statusCode !== 200) {
deferred.reject(response.statusCode);
return;
}
deferred.resolve(JSON.parse(response.body));
});
return deferred.promise;
};
Very simple stuff. The API expects a POST request. The searchParams is the AQL itself.
I have tested the AQL string in Postman and it works fine.
But, when using this code, I get a 404.
I fell the issue is with "body", but not sure what else I should do.
Any suggestions?
Thanks
The text was updated successfully, but these errors were encountered:
Hi,
I am trying to extend this library to support the AQL API call. Here's what I've done so far:
Very simple stuff. The API expects a POST request. The searchParams is the AQL itself.
I have tested the AQL string in Postman and it works fine.
But, when using this code, I get a 404.
I fell the issue is with "body", but not sure what else I should do.
Any suggestions?
Thanks
The text was updated successfully, but these errors were encountered: