title: Cakephp - If Request is JSON?
body: <p>I have read the <code>RequestHandler</code> part in <a href="http://book.cakephp.org/2.0/en/core-libraries/components/request-handling.html" rel="noreferrer">cookbook</a>. There are <code>isXml()</code>, <code>isRss()</code>, etc. But there's no <code>isJson()</code>.</p>
  
  <p>Any other way to check whether a request is JSON? </p>
  
  <p>So when the url is <code>mysite.com/products/view/1.json</code> it will give JSON data, but without <code>.json</code> it will give the HTML View.</p>
  
  <p>Thanks</p>