Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const post_options = {
- url: 'https://connect.calamp.com',
- protocol: 'https:',
- host: 'connect.calamp.com',
- port: '443',
- path: '/connect/services/login?useAuthToken=true&username=' + encodeURIComponent('username') + '&password=' + encodeURIComponent('password'),
- method: 'POST',
- headers: {
- 'calamp-services-app': 'f12f0f55-28d7-4936-a102-58426cxxxxx'
- }
- };
- const req = https.request(post_options, (res) => {
- console.log(res.statusCode) // 200
- });
- req.write(JSON.stringify({}));
- req.end();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement