title: Why is this basic ajax call giving me a 400 and not firing to the controller?
body: <p>This is only a problem for me in my newest dot net core 2 web app, it works in previous dot net apps with no issue.</p>
  
  <p>I have a custom javascript file with paths to various servers that my site is hosted on(mainly dev, test, live).</p>
  
  <p>My ajax call looks like the following:</p>
  
  <pre><code>var gameid = '@Html.Raw(Model.Id)';
      $.ajax({
          type: 'GET',
          url: url() + "UserGames/HasGame?id=" +gameid,
          cache: false,
          success: function (data) {
              console.log(data);
          },
          error: function (req, status, err) {
              console.log('Something went wrong', status, err);
          }
      });
  </code></pre>
  
  <p>The url() in question is simply looking at my local server while testing(*please note, this port has been edited, it is correct):</p>
  
  <pre><code>function url() {
  return "https://localhost:4432/";
  }
  </code></pre>
  
  <p>The error is not firing as it isnt even reaching the controller function being used.</p>
  
  <p>I'm absolutely bemused as to why this isnt working, i could understand if i was getting some sort of error back, but i have used ajax calls in all of my apps and not had this problem at all until using core 2.</p>
  
  <p>Has anything changed that may have affected the way you use ajax calls?</p>
  
  <p>Method that is trying to fire, but i mentioned, it isnt hitting the controller(NOTE: the method does have code in it, it just isnt hitting the controller in the first place)</p>
  
  <pre><code>[HttpGet]
  [ValidateAntiForgeryToken]
  public async Task&lt;IActionResult&gt; HasGame(int id)
  {
      //stuff in here
  }
  </code></pre>