I am using closure library to do a simple POST. I think XhrIo should work because from my machine when I use any other rest client ,like Firefox browser app RESTClient or Ch
When you add a header to an XHR object, most browsers will do a preflight request, which is the OPTIONS
method that you are seeing. There is not a way to circumvent this if you are adding custom headers, unfortunately. The POST
will be sent after the OPTIONS
.
This article explains the OPTIONS
request a bit. I ran into issues with the preflight a while back, if that is any help.
If you have specific issues with the OPTIONS
request you should edit your question to include them; otherwise, this is expected behavior.