httphttp-postmime-typeshttp-method

Safe (HTTP Methods): POST with certain MIME types?


From MDN (Archive):

for HTTP request methods that can cause side-effects on server data (in particular, HTTP methods other than GET, or POST with certain MIME types), the specification mandates that browsers "preflight" the request

I concluded that there are "Safe HTTP POST Methods (with certain MIME types)" based on the above statement.

Am I right? And if so, what are these MIME types?


Solution

  • After some research, I came to the conclusion that my understanding of the above quote is wrong. The sentence in parentheses, a quote from MDN, is not about the side effects of the request method, but rather about the request method being eligible for a preflight request (The sentence is a bit ambiguous, I'm not a native speaker).

    The above sentence tries to state that preflight requests are not sent for GET requests and POST requests that include headers with a specific Content-Type.

    Although this is no longer a question but a misunderstanding correction, I will not remove this question.