title: how do i add a json body to my axios post request?
body: <pre><code>  submitForm = (e) =&gt; {
      e.preventDefault();
      sessionStorage.setItem('username', this.state.username);
      sessionStorage.setItem('password', this.state.password);
  
      axios.post('/authenticate', {data: {
        username: sessionStorage.getItem('username'),
        password: sessionStorage.getItem('password')
      }})
      .then((response) =&gt; {
         this.setState({
           jwttoken: response.data
         })
       },
       sessionStorage.setItem('token', this.state.jwttoken)
       )
  </code></pre>
  <p>this is my post request but it does not seem to work
  i need to add a username and password in the body,
  am i doing it right?</p>