title: Get the data received in a Flask request
body: <p>I want to be able to get the data sent to my Flask app. I've tried accessing <code>request.data</code> but it is an empty string. How do you access request data?</p>
  
  <pre class="lang-py prettyprint-override"><code>from flask import request
  
  @app.route('/', methods=['GET', 'POST'])
  def parse_request():
      data = request.data  # data is empty
      # need posted data here
  </code></pre>
  
  <hr>
  
  <p>The answer to this question led me to ask <a href="https://stackoverflow.com/q/10999990">Get raw POST body in Python Flask regardless of Content-Type header</a> next, which is about getting the raw data rather than the parsed data.</p>