api-mate icon indicating copy to clipboard operation
api-mate copied to clipboard

Send POST request is being sent as an OPTIONS HTTP method

Open GhaziTriki opened this issue 9 years ago • 1 comments

Sending a POST request for the "create" API is sent as an OPTIONS instead. Please find HTTP headers below:

Status Complete Response Code 200 OK Protocol HTTP/1.1 SSL - Method OPTIONS Kept Alive Yes Content-Type text/xml;charset=utf-8 Client Address /127.0.0.1

GhaziTriki avatar Feb 08 '16 10:02 GhaziTriki

This is not necessarily an error. It is done automatically by the browser because we set the request as cross domain. So it does an OPTIONS request to check if cross domain requests are possible and then it will do the proper request.

This is where the ajax request is made in the code.

Take a look at this question on stack overflow http://stackoverflow.com/a/21783145

daronco avatar Feb 10 '16 17:02 daronco