Why does the post request of ajax trigger options first?

Why does the post request of ajax trigger options first?
what should I do if I want to trigger the options request first and then the post request?

Apr.29,2021

A CORS (cross-domain) request that is not a simple request adds a HTTP query request, called a "pre-check" request (preflight), before the formal communication.

that is, an post request will be sent before your OPTIONS request

take a look at this: Cross-domain Resource sharing CORS


Cross-domain

because your request originating domain and arriving domain are not in the same domain , the browser will first launch a OPTIONS request to ask arriving domain to allow those request methods , request header , initiating domain , etc.
Menu