Title: WP_REST_Server::is_dispatching
Published: April 3, 2024
Last modified: April 28, 2025

---

# WP_REST_Server::is_dispatching(): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_rest_server/is_dispatching/?output_format=md#description)
 * [Return](https://developer.wordpress.org/reference/classes/wp_rest_server/is_dispatching/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_rest_server/is_dispatching/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_rest_server/is_dispatching/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_rest_server/is_dispatching/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_rest_server/is_dispatching/?output_format=md#wp--skip-link--target)

Returns whether the REST server is currently dispatching / responding to a request.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_rest_server/is_dispatching/?output_format=md#description)󠁿

This may be a standalone REST API request, or an internal request dispatched from
within a regular page load.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_rest_server/is_dispatching/?output_format=md#return)󠁿

 bool Whether the REST server is currently handling a request.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_rest_server/is_dispatching/?output_format=md#source)󠁿

    ```php
    public function is_dispatching() {
    	return (bool) $this->dispatching_requests;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/rest-api/class-wp-rest-server.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1139)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1139-L1141)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_rest_server/is_dispatching/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_is_rest_endpoint()](https://developer.wordpress.org/reference/functions/wp_is_rest_endpoint/)`wp-includes/rest-api.php` |

Checks whether a REST API endpoint request is currently being handled.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_rest_server/is_dispatching/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.5.0](https://developer.wordpress.org/reference/since/6.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_rest_server%2Fis_dispatching%2F)
before being able to contribute a note or feedback.