Request (query) (tag)

wp_is_json_request()

Checks if the current request is a JSON request or expects a JSON response.

wp_is_jsonp_request()

Checks if the current request is a JSONP request or expects a JSONP response.