var req = https.request({
host: 'dashboard.meraki.com',
path: '/api/v0/networks/1234567/vlans/',
headers: {
'x-cisco-meraki-api-key': '12345678'
},
method: 'POST'
}, function (response) {
if (response.statusCode > 300 && response.statusCode < 400) {
}
console.log(response.headers);
response.on('data', (data)=> {
body += data;
});
response.on('end', ()=> {
response.write(body)
});
console.log(response);
});
req.write('');
req.end();
Thanks...
Mike
If you are getting a redirect then there should be a Location header with a new path or URL in it. Use that to create a new request. It is up to you which HTTP method you use for that request.
~Ryan
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/0969c55e-efbb-4ff5-bfd6-6459d4c556b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
~Ryan