Regular expression to check for content type application/json etc
<p>This particular application is returning <code>content-type</code> headers in the format <code>application/json;charset=UTF-8</code></p>

<p>I'm not sure if this could change and get reduced to 'application/json' only or may be if I reuse this code somewhere else for?</p>

<p>My code is</p>

<p><code>response.headers['Content-Type'].match(/text\/application//json/i)</code></p>

<p>How to best check for content type application/json???</p>