title: Can't get variable by POST at backend via AJAX, while it's perfectly fine at front-end
body: <p>Ok, so, here is my problem. I'm trying to send tag attribute which I store in javascript variable to backend(PHP) via AJAX.</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: '/requests/mercury.php',
      data: {url : $(this).data('link')},
      success: function(data){
         console.log(data);
      }
  </code></pre>
  
  <p>It's a URL which I want to pass to CURL request.</p>
  
  <p>CURL request is working if I write correct URL  manually, but by some reason I can't retrieve variable at backend.
  I've tried debugging and it seems like I'm getting an empty array and I don't know why. </p>
  
  <pre><code>$link = $_POST['url'];
  
  $ch = curl_init();
  
  curl_setopt($ch, CURLOPT_URL, "https://mercury.postlight.com/parser?url=".$link);
  
  curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      "x-api-key: AU5zjyEqyL0LgR8zkb4Iurhlenpn52bGtbiqJA4t",
  ));
  
  $x = curl_exec($ch);
  
  curl_close($ch);
  </code></pre>
  
  <p>Tried to deploy at localhost(MAMP) and Heroku, at both places same problem.</p>
  
  <p>Full code is avalible at <a href="https://github.com/pjotrleshkin/RSSParsing" rel="nofollow noreferrer">https://github.com/pjotrleshkin/RSSParsing</a></p>