dreamworker

axios error get body

Jul 26th, 2019
716
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //node v10.16.0
  2.  
  3. const axios = require('axios');
  4.  
  5. axios.post('http://tomcatdev.tv.kvant-telecom.ru:8080/sentinel/auth', {
  6.         login: 'warhammer',
  7.         password: '4000'
  8.     })
  9.     .then(function(response) {
  10.         console.log(response);
  11.     })
  12.     .catch(function(error) {
  13.         //console.log(error);
  14.  
  15.         console.log("==========================");
  16.  
  17.         console.log(error.response.status);
  18.         console.log(error.response.data);
  19.     });
Advertisement
Add Comment
Please, Sign In to add comment