Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var notificationValue= {"applicationId":"32769","schemaId":"32778","topicId":"32770","type":"USER"};
- var file = 'notification.json';
- var opts = {
- url: 'http://localhost:8080/kaaAdmin/rest/api/sendNotification',
- method: 'POST',
- auth: { user: 'devuser', password: 'devuser123' },
- json: true,
- formData: {
- notification: JSON.stringify(notificationValue),
- file : fs.readFileSync(file)
- }
- };
- request(opts, function(err, resp, body) {
- if(err)
- res.send(err);
- else{
- res.send(body);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement