Hi,
I’m trying to deploy a release using the npm module “request” but keep getting errors no matter how I post.
This is what I’m trying
var request = require('request');
var octopusServer = 'http://myOctopusServer';
request.post({
headers: { 'X-Octopus-ApiKey': 'my-actual-apikey' },
json: true,
url: octopusServer + '/api/deployments',
body: {
ReleaseID: 'actualReleaseId',
EnvironmentID: 'actualEnvironmentId'
}
}, function(err, res){
if(err) { throw err; }
console.log(res);
})
I’ve tried settings json to false, stringifying the body object or using form/formData instead.
Any help appreciated!!
Thanks,
Tobias