Filters the REST API response.
Allows modification of the response before returning.
$resultWP_HTTP_Response
WP_REST_Response.$serverWP_REST_Server
$requestWP_REST_Request
$result = apply_filters( 'rest_post_dispatch', rest_ensure_response( $result ), $this, $request );
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_post_dispatch