Regular Expressions 101

Community Patterns

HTTP Header Content Type Application JSON

1

Regular Expression
ECMAScript (JavaScript)

/
^application\/(.+\+)?json$
/
mg

Description

Useful to check the HTTP content-type as application/json since sometimes people created their own custom content-type on top of JSON.

Submitted by Yordis Prieto (Alchemist Ubi) - 3 years ago