I am trying to make a cors
PUT request using the vanilla Fetch API
When I click my button to send the PUT request, the method on the first request is OPTIONS
. It is only when I click the button again, then the method on the request changes to PUT
. Why?
I understand this is part of the CORS preflight, but is there a way to trigger the preflight manually so the OPTIONS response can be cached?
Could this behavior be indicative of a failing promise somewhere?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…