Send a request to write interfaces, console printed twice

In CORS- original cross-domain resource sharing can be used OPTIONS method to initiate a preflight request , to detect whether an actual request may be accepted by the server. Access-Control-Request-Method preflight request packet header field to inform HTTP request method for the server actually used; Access-Control-Request-Headers Custom header field to inform the server header field carries the actual request. Based on information obtained from the server preflight request to judge whether to accept the next request practical. The browser first asks the server, whether the domain name of the current page in the list of license server, and which HTTP verbs can and header field use. Only positive response, the browser will issue a formal request XMLHttpRequest, otherwise an error.
 

https://blog.csdn.net/weixin_43549408/article/details/84251680

Guess you like

Origin blog.csdn.net/weixin_39207535/article/details/88873918