title: Problems in trying to POST json data to python flask server
body: <p>I am trying to Post a json to my flask server, but the post request always fails. This is how I am doing it, any idea what is am doing wrong?</p>
  
  <pre><code>jQuery.ajax({
      url:'/someLink',
      method:'POST',
      data:JSON.stringify({"sampleKey":"Value"}),
      success:function(data){
          console.log(data);
      },
  });
  </code></pre>
  
  <p>And my flask server looks something like</p>
  
  <pre><code>@app.route('/someLink', methods=['POST'])
  def someFn():
   sampleKey = str(request.form['sampleKey'])
  </code></pre>
  
  <p>I believe there is some data serializing issue, as the following request works </p>
  
  <pre><code>jQuery.post('/someLink',{"sampleKey":"Value"},function(data){console.log(data)});
  </code></pre>