Advertisement
Guest User

Post Method

a guest
Nov 19th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ...
  2. post(url , bodyJson, callback) {
  3.         var options = {
  4.             method: 'post',
  5.             url: API_URL+url,
  6.             json: true,
  7.             body: bodyJson
  8.         }
  9.  
  10.         requests(options, function(err,resp,body){
  11.             callback(err,resp,body);
  12.         });
  13.          return options;
  14. },
  15. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement