Request (query) (tag)

wp_is_json_request()

Checks whether current request is a JSON request, or is expecting a JSON response.

wp_is_jsonp_request()

Checks whether current request is a JSONP request, or is expecting a JSONP response.