Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. { "alert" : "You have a request for payment."}
  2.  
  3. 400 {
  4. "code": "FPWSE0004E",
  5. "message": "Bad Request - Invalid JSON."
  6. }
  7.  
  8. var message = {
  9. alert : "You have a request for payment.",
  10. url : "payment_id"
  11. };
  12. var options = {
  13. host : 'mobile.ng.bluemix.net',
  14. port : 443,
  15. path : '/imfpush/v1/apps/'+appId +'/devices/'+deviceId,
  16. method : 'PUT',
  17. headers : headers,
  18. data: JSON.stringify(message)
  19. };
  20.  
  21. var reqPost = https.request(options, function(res) {
  22. res.on('data', function(d) {
  23. console.info('PUT result:n');
  24. process.stdout.write(d);
  25. console.info('nPUTcompleted');
  26. });
  27. });
  28.  
  29. reqPost.end();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement