Is there any ways to do this using jquery without redundant OPTIONS request?
P.S. By the way, what is the great mission of such workflow?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
So, now it is obviously that OPTIONS can be usefull, but in a bit strange (in my opinion) manner.
All PUT and DELETE queries, and queries with modified headers are preflight with such request. The great mission is in checking resource availability for providing some kind of operation.
For example, let consider PUT operation on http://a.com/users/100500 resource with ABUBAKA header.
Preflight OPTIONS request will contain:
using this info you can decide what to do with such an request. For example, such resource could support both PUT and DELETE operations, and using ABUBAKA header is ok. In this case response should at least contain such headers
So, OPTIONS is some kind of policy method.