title: Flask, receive string from AJAX
body: <p>I want to try and pass a string from AJAX to Flask, the request is being received, but there doesn't seem to be any data coming through</p>
  
  <p>AJAX:</p>
  
  <pre><code>function scan(){
      var i = $(".btn.btn-default").attr("id");
      var id = i.toString();
      console.log(id);
     $.ajax({
       type: "GET",
       url: '/scan',
       data: id,
       success: function(data) {
  
       console.log(data);
     }
  }); 
  }
  </code></pre>
  
  <p>Python / Flask:</p>
  
  <pre><code>if request.method == 'GET':
      logger.log('request received') #this is printing out successfully
      a = request.data
      if a == 'mystring':
          return 'Successful'
  </code></pre>
  
  <p>What am I doing wrong? It must be something incredibly simple. </p>