title: How to use `axios` post a raw data
body: <p>I have a backend rest API which accept post request. I am able to send post request to the API through postman with below settings:</p>
  
  <pre><code>Method: POST
  Header: Content-Type: application/json
  Body: raw
        {"date": "2018-08-18"}
  </code></pre>
  
  <p>but I got 405 method not allow error with below axios code. </p>
  
  <pre><code>axios
        .post(
          url,
          JSON.stringify({
            date: "2018-08-18"
          }),
          {
            headers: {
              "Content-Type": "application/json"
            }
          }
        )
  </code></pre>
  
  <p>If I remove the headers I will get 400 error code as below:</p>
  
  <pre><code>axios
            .post(
              url,
              JSON.stringify({
                date: "2018-08-18"
              })
            )
  </code></pre>
  
  <p>I also tried to remove stringify but it still doesn't work. I got 405 response:</p>
  
  <pre><code>axios
                .post(
                  url,
                  {
                    date: "2018-08-18"
                  },
                  {
                    headers: {
                      "Content-Type": "application/json"
                    }
                  }
                )
  </code></pre>
  
  <p>It is probably because of the body message. Is there a way for me to use axios to send the raw json data?</p>