Why this angular $http.put parameter won't get passed?
<p>I am facing a very weird case in my angularjs app. In a factory, the following code works properly:</p>

<pre><code>$http.put(apiBase + 'delete?id='+orderId);
</code></pre>

<p>Which obviously connects to an api to perform a PUT operation (it is called "delete" here but it actually only updates a flag in the record).</p>

<p>But the same code, when written this way, does not work:</p>

<pre><code>$http.put(apiBase + 'delete', {
    params: {
      id: orderId
    }
  }
);
</code></pre>

<p>Which is funny, because I am using the exact same syntax in some other factories to hit similar APIs and they work!</p>