title: React, Axios and Flask - AttributeError: 'NoneType' object has no attribute 'get'
body: <p>I'm trying to post some data from my <code>react</code> component via <code>axios</code> to my <code>Flask</code> server, like so:</p>
  
  <pre><code>handleSubmitSeeds(event) {
      event.preventDefault();
      const {userId} = this.props
      const data = {
        arabica: this.state.formSeeds
      };
      const url = `${process.env.REACT_APP_WEB_SERVICE_URL}/handle_seeds/${userId}`;
      axios.post(url, data)
        .then((res) =&gt; {
          console.log(data);
        })
        .catch((err) =&gt; {
        });
    };
  </code></pre>
  
  <p>and at backend:</p>
  
  <pre><code>@seeds_bp.route('/handle_seeds/&lt;user_id&gt;', methods=['GET','POST'])
  def handle_seeds(user_id):
  
      post_data = request.get_json()
  
      arabica = post_data.get('arabica')
  
      (...)
  </code></pre>
  
  <p>but i'm getting the following traceback:</p>
  
  <pre><code>AttributeError: 'NoneType' object has no attribute 'get'
  </code></pre>
  
  <p>what am I missing?</p>