title: Could not get the values from an Ajax post
body: <p>I made a a constructor for an object in Javascript. I would like this object to be able to send some data to the server.</p>
  
  <pre><code>function basket(list_of_things, price, basket_name){
        this.list_of_things = list_of_things;
        this.price = price;
        this.basket_name = basket_name;
        this.share = function(){
          $.post('/post_basket',
          {
            basket_name: this.basket_name,
            list_of_things: this.list_of_things
          },
          function(data,status){
            alert("Data: " + data + "\nStatus: " + status);
          });
          };
          };
  </code></pre>
  
  <p>I have also made a route in my Python function</p>
  
  <pre><code>@app.route('/post_basket', methods=['POST'])
  def post_basket():
      a = request.args.get('basket_name', type = str)
      print a
      return ("poo")
  </code></pre>
  
  <p>I would like to get the data from the Ajax post and it kept returning None to me. What could be the problem here?</p>