Advertisement
Guest User

Untitled

a guest
May 16th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. var request = require("request");
  2.  
  3. var options = { method: 'POST',
  4. url: 'http://localhost:8080/api/login',
  5. form: { user: 'matsk', pass: 'R1nse&repeat' } };
  6.  
  7. request(options, function (error, response, body) {
  8. if (error) throw new Error(error);
  9.  
  10. console.log(body);
  11. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement