title: request works with Postman but not with axios.post
body: <p>I created a registration form in React-js with axios.post().
  The request works perfectly via Postman which makes the backend guilt-free, 
  but don't have any reaction in my component.</p>
  
  <p>Using Try/catch or finally() don't have any effect.
  i don't have any errors in the console.
  All my variables are defined as follows:</p>
  
  <pre><code>constructor(props) {
      super(props);
      this.state = {
          passwd: ''
      }
  }
  
  onFieldChange(fieldName) {
      return function (event) {
          this.setState({[fieldName]: event.target.value});
      }
  }
  
  render() {
      return (
          [...]
          &lt;form onSubmit={() =&gt; this.handleSubmit()}&gt;
          &lt;input type="password" value={this.state.passwd}
                 onChange={this.onFieldChange('passwd').bind(this)} 
                 placeholder="* Password" required /&gt;
              &lt;button type="submit"&gt;Sign-up&lt;/button&gt;
          &lt;/form&gt;
          [...]
  </code></pre>
  
  <p>the problem part: 
  (the (if/else) is working properly and redirection to /SignIn works elsewhere)</p>
  
  <pre><code>handleSubmit(event) {
      if (this.state.email === this.state.email02
          &amp;&amp; this.state.passwd === this.state.passwd02
          &amp;&amp; this.state.lastname !== '') {
          const data = {
              email: this.state.email,
              passwd: this.state.passwd,
              lastname: this.state.lastname,
              firstname: this.state.firstname
          }
          const config = {
              headers: {'Content-Type': 'application/x-www-form-urlencoded'}
          }
  
          axios.post('http://104.XX.YY.192:8081/register', data, config)
              .then(response =&gt; {
                  this.props.history.push('/SignIn');
              })
              .catch(err =&gt; {
                  console.log(err);
              })
      } else if (this.state.email !== this.state.email02) {
          console.log('email are not the same');
      } else if (this.state.passwd !== this.state.passwd02) {
          console.log('password are not the same');
      }
  }
  </code></pre>
  
  <p>i'm looking forward to hearing from you.</p>