request->getHeader('Content-Type'); if(empty($content_type_header)) return false; return strpos($content_type_header, '/json')!==false; } }