DELETE function results in "no response from server" while GET and POST function work correctly in Developer Portal

Hi,

For some reason the delete function does not work in Tyk Developer Portal. I have also tried the same function in a REST client application to test the function and it works correctly. It looks like the developer portal does not work correctly and the gateway itself works fine.

We are using Tyk v1.3.1.2.

Please see the screenshot below:

I have also added an extra test object to check if the delete function needs a mandotary HTTP request body. This wasn’t the problem.

Kind regards,

Tim

This could be a few things, have you checked the output from your browser console? also, does the gateway report any issues in it’s log?

Hi Martin,

Thanks for your reply. The following error is thrown in my chrome console:
Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin 'http://****:3000’ is therefore not allowed access.

Kind regards,

Tim

I found the issue. I had to allow the method DELETE in the specific API. I don’t know the technical reason why I have to allow this method. Martin, can you explain this?

Kind regards,

Tim

Hi Tim,

This is a CORS error, which is a standard used to secure XMLHttpRequests in browsers to avoid malicous scripts making requests that they are not specifically authorised to do. There’s an extensive discussion about it here and how it works with Tyk.

Cheers,
M.