title: request.json only returns string
body: <p>I use Axios and Flask to develop RESTful API.</p>
  
  <p>But there is a problem about JSON data between Axios and Flask.</p>
  
  <p>I cannot get JSON data from Axios by <code>request.json</code>.</p>
  
  <p>I try a lot of ways, but nothing works.</p>
  
  <p>Mostly, <code>request.json</code> will get <code>None</code>, and <code>request.data</code> will get:</p>
  
  <pre><code>b'------WebKitFormBoundaryNzW4jnyUkdEH3jsX\r\nContent-Disposition: form-data; name="user"\r\n\r\nu\r\n------WebKitFormBoundaryNzW4jnyUkdEH3jsX\r\nContent-Disposition: form-data; name="pwd"\r\n\r\np\r\n------WebKitFormBoundaryNzW4jnyUkdEH3jsX--\r\n'
  </code></pre>
  
  <p>After debugging, <code>request.json</code> can get the data now.</p>
  
  <p>But it can only get <code>string</code>, not <code>json</code>.</p>
  
  <p>Here is the code:</p>
  
  <h1>Axios</h1>
  
  <pre class="lang-js prettyprint-override"><code>var config = {headers: {'Content-Type': 'application/json'}}
  axios.post('/api/user', {user: 'user', pwd: 'pwd'}, config)
  .then(function(resp) {
      // ...
  })
  .catch(function(error) {
      // ...
  });
  </code></pre>
  
  <h1>Flask</h1>
  
  <pre><code>@app.route('/api/user', methods=['POST'])
  def user():
      j = request.json
      print(j)
      print(type(j))
  </code></pre>
  
  <h1>Result</h1>
  
  <pre><code>{"user": "user", "pwd": "pwd"}
  class 'str'
  </code></pre>
  
  <p>How do I fix it?
  Thank you.</p>