Search code examples
trigger.io

calling forge.ajax with type: 'DELETE' generates a GET request


When calling forge.ajax with type: DELETE the generated request (as observed on Proxy and also logged on the server side) is a GET.

'POST' and 'PUT' seem to be working just fine on the other hand.

Example:

window.forge.ajax({
  type: 'DELETE', 
  url: 'http://www.boorgle.com/api/v1/friends/4f463d32ff47b20018000002', 
  error: function() {console.log('error', arguments);}, 
  success: function() {console.log('success', arguments);}
})

Any idea how to fix this?


Solution

  • I assume this is on iOS?

    The underlying HTTP library we are using didn't support the DELETE verb, but I've just checked and that seems to have been fixed, so we should be able to address this in a future platform release: I'll update this answer when that happens!