🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)
🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)

🔧 Programmierung 🕛 kürzlich 2 Min Lesezeit
0

What Is a Simple Request and When Does the Browser Send a Preflight Request?

↗ Quelle (dev.to)
🗣️ Stimme:

In the previous article, we learned that browsers sometimes send an OPTIONS request before the actual Cross-Origin request. This process is known as a CORS Preflight Request.



But does this happen for every request?



The answer is no.



Browsers only perform a Preflight Request when the request does not qualify as a Simple Request.



What Is a Simple Request?



A Simple Request is a Cross-Origin request that satisfies a specific set of conditions defined by the Fetch specification.



Since these requests are considered low risk, the browser sends them directly without performing a Preflight check.



CORS rules still apply to the response, but no preliminary OPTIONS request is needed.



Requirements for a Simple Request



A request is considered simple only if all of the following conditions are met.



1. HTTP Method



The request method must be one of:




  • GET

  • HEAD

  • POST



Methods such as PUT, PATCH, and DELETE automatically trigger a Preflight Request.



2. Request Headers



The request may only include CORS-safelisted request headers, such as:




  • Accept

  • Accept-Language

  • Content-Language



Adding headers like:




CODE
Authorization: Bearer <token>






or




CODE
X-API-Key: 123456






causes the browser to perform a Preflight Request.



3. Content-Type



If the request has a body, its Content-Type must be one of:




  • application/x-www-form-urlencoded

  • multipart/form-data

  • text/plain



Using a content type such as:




CODE
application/json






makes the request non-simple and triggers a Preflight Request.



This is one of the most common reasons developers see OPTIONS requests in modern web applications.



Examples



This request is simple:




CODE
fetch("/users")






No Preflight Request is sent.



This request is also simple:




CODE
fetch("/login", {
method: "POST",
headers: {
"Content-Type": "text/plain"
}
})






Again, no Preflight is required.



However, this request is not simple:




CODE
fetch("/login", {
method: "POST",
headers: {
"Content-Type": "application/json"
}
})






The browser first sends an OPTIONS request.



The same happens here:




CODE
fetch("/profile", {
headers: {
"Authorization": "Bearer token"
}
})






Because the Authorization header is not CORS-safelisted, a Preflight Request is required.



Summary



A browser sends a Preflight Request only when a Cross-Origin request does not meet the requirements of a Simple Request.



The most common triggers are:




  • Using methods such as PUT, PATCH, or DELETE

  • Including non-safelisted headers such as Authorization

  • Using content types like application/json



This is why seeing an OPTIONS request before the actual request is completely normal in many modern APIs.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
3 Quellen
GPT-6 Astra Release Today? OpenAI’s Next Major AI Model Is Almost Here
1 Quelle
Apple accuses OpenAI of destroying evidence as trade-secrets fight intensifies
1 Quelle
Major AI platforms go down in unprecedented simultaneous outage
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten What Is a Simple Request and When Does the Browser Send a Preflight Request?

Thematisch verwandte Begriffe: What, Simple, Request, When · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...