DEV Community

Discussion on: REST API Design Best Practices for Parameters and Query String Usage

Collapse
 
mert profile image
Mert Yazıcıoğlu

If your API is or can be called cross-domain, adding a custom header will require browsers to do a CORS preflight check where they might have been able to omit it before--making requests to your API slower!

Although that’s technically true, you’ll most likely trigger the CORS preflight check anyway due to the Content-Type as it’s quite unlikely you’ll be using one of the plain-text or form data types.