Title: wp-includes/rest-api/class-wp-rest-server.php | Developer.WordPress.org

---

# File: wp-includes/rest-api/class-wp-rest-server.php

 * method[WP_REST_Server::get_target_hints_for_link()](https://developer.wordpress.org/reference/classes/wp_rest_server/get_target_hints_for_link/)
 * Gets the target hints for a REST API Link.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/get_target_hints_for_link/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/get_target_hints_for_link/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:665](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L665-L705)
 * method[WP_REST_Server::is_dispatching()](https://developer.wordpress.org/reference/classes/wp_rest_server/is_dispatching/)
 * Returns whether the REST server is currently dispatching / responding to a request.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/is_dispatching/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/is_dispatching/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1139](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1139-L1141)
 * hook[rest_json_encode_options](https://developer.wordpress.org/reference/hooks/rest_json_encode_options/)
 * Filters the JSON encoding options used to send the REST API response.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/rest_json_encode_options/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/rest_json_encode_options/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:266](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L266-L266)
 * method[WP_REST_Server::get_json_encode_options()](https://developer.wordpress.org/reference/classes/wp_rest_server/get_json_encode_options/)
 * Gets the encoding options passed to {@see wp_json_encode}.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/get_json_encode_options/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/get_json_encode_options/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:251](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L251-L267)
 * method[WP_REST_Server::add_site_icon_to_index()](https://developer.wordpress.org/reference/classes/wp_rest_server/add_site_icon_to_index/)
 * Exposes the site icon through the WordPress REST API.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/add_site_icon_to_index/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/add_site_icon_to_index/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1473](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1473-L1479)
 * method[WP_REST_Server::add_image_to_index()](https://developer.wordpress.org/reference/classes/wp_rest_server/add_image_to_index/)
 * Exposes an image through the WordPress REST API.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/add_image_to_index/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/add_image_to_index/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1492](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1492-L1504)
 * method[WP_REST_Server::add_site_logo_to_index()](https://developer.wordpress.org/reference/classes/wp_rest_server/add_site_logo_to_index/)
 * Exposes the site logo through the WordPress REST API.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/add_site_logo_to_index/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/add_site_logo_to_index/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1457](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1457-L1461)
 * method[WP_REST_Server::add_active_theme_link_to_index()](https://developer.wordpress.org/reference/classes/wp_rest_server/add_active_theme_link_to_index/)
 * Adds a link to the active theme for users who have proper permissions.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/add_active_theme_link_to_index/#used-by)
   | Uses [4 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/add_active_theme_link_to_index/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1425](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1425-L1445)
 * method[WP_REST_Server::get_max_batch_size()](https://developer.wordpress.org/reference/classes/wp_rest_server/get_max_batch_size/)
 * Gets the maximum number of requests that can be included in a batch.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/get_max_batch_size/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/get_max_batch_size/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1695](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1695-L1704)
 * hook[rest_get_max_batch_size](https://developer.wordpress.org/reference/hooks/rest_get_max_batch_size/)
 * Filters the maximum number of REST API requests that can be included in a batch.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/rest_get_max_batch_size/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/rest_get_max_batch_size/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1703](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1703-L1703)
 * method[WP_REST_Server::serve_batch_request_v1()](https://developer.wordpress.org/reference/classes/wp_rest_server/serve_batch_request_v1/)
 * Serves the batch/v1 request.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/serve_batch_request_v1/#used-by)
   | Uses [13 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/serve_batch_request_v1/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1714](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1714-L1872)
 * method[WP_REST_Server::match_request_to_handler()](https://developer.wordpress.org/reference/classes/wp_rest_server/match_request_to_handler/)
 * Matches a request object to its handler.
 * Used by [3 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/match_request_to_handler/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/match_request_to_handler/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1152](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1152-L1223)
 * method[WP_REST_Server::respond_to_request()](https://developer.wordpress.org/reference/classes/wp_rest_server/respond_to_request/)
 * Dispatches the request to the callback handler.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/respond_to_request/#used-by)
   | Uses [7 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/respond_to_request/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1237](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1237-L1329)
 * hook[rest_allowed_cors_headers](https://developer.wordpress.org/reference/hooks/rest_allowed_cors_headers/)
 * Filters the list of request headers that are allowed for REST API CORS requests.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/rest_allowed_cors_headers/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/rest_allowed_cors_headers/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:432](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L432-L432)
 * hook[rest_exposed_cors_headers](https://developer.wordpress.org/reference/hooks/rest_exposed_cors_headers/)
 * Filters the list of response headers that are exposed to REST API CORS requests.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/rest_exposed_cors_headers/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/rest_exposed_cors_headers/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:406](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L406-L406)
 * hook[rest_pre_echo_response](https://developer.wordpress.org/reference/hooks/rest_pre_echo_response/)
 * Filters the REST API response.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/rest_pre_echo_response/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/rest_pre_echo_response/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:538](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L538-L538)
 * method[WP_REST_Server::remove_header()](https://developer.wordpress.org/reference/classes/wp_rest_server/remove_header/)
 * Removes an HTTP header from the current response.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/remove_header/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/remove_header/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1925](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1925-L1927)
 * hook[rest_request_after_callbacks](https://developer.wordpress.org/reference/hooks/rest_request_after_callbacks/)
 * Filters the response immediately after executing any REST API callbacks.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/rest_request_after_callbacks/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/rest_request_after_callbacks/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1317](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1317-L1317)
 * hook[rest_request_before_callbacks](https://developer.wordpress.org/reference/hooks/rest_request_before_callbacks/)
 * Filters the response before executing any REST API callbacks.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/rest_request_before_callbacks/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/rest_request_before_callbacks/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1255](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1255-L1255)
 * method[WP_REST_Server::get_compact_response_links()](https://developer.wordpress.org/reference/classes/wp_rest_server/get_compact_response_links/)
 * Retrieves the CURIEs (compact URIs) used for relations.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/get_compact_response_links/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/get_compact_response_links/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:718](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L718-L756)
 * method[WP_REST_Server::get_headers()](https://developer.wordpress.org/reference/classes/wp_rest_server/get_headers/)
 * Extracts headers from a PHP-style $_SERVER array.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/get_headers/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/get_headers/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1959](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1959-L1984)
 * method[WP_REST_Server::send_header()](https://developer.wordpress.org/reference/classes/wp_rest_server/send_header/)
 * Sends an HTTP header.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/send_header/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/send_header/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1893](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1893-L1903)
 * method[WP_REST_Server::send_headers()](https://developer.wordpress.org/reference/classes/wp_rest_server/send_headers/)
 * Sends multiple HTTP headers.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/send_headers/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/send_headers/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1912](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1912-L1916)
 * method[WP_REST_Server::get_raw_data()](https://developer.wordpress.org/reference/classes/wp_rest_server/get_raw_data/)
 * Retrieves the raw request entity (body).
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/get_raw_data/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/get_raw_data/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1938](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1938-L1949)
 * method[WP_REST_Server::get_data_for_routes()](https://developer.wordpress.org/reference/classes/wp_rest_server/get_data_for_routes/)
 * Retrieves the publicly-visible data for routes.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/get_data_for_routes/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/get_data_for_routes/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1561](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1561-L1594)
 * hook[rest_endpoints_description](https://developer.wordpress.org/reference/hooks/rest_endpoints_description/)
 * Filters the publicly-visible data for a single REST API route.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/rest_endpoints_description/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/rest_endpoints_description/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1578](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1578-L1578)
 * hook[rest_route_data](https://developer.wordpress.org/reference/hooks/rest_route_data/)
 * Filters the publicly-visible data for REST API routes.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/rest_route_data/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/rest_route_data/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1593](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1593-L1593)
 * method[WP_REST_Server::get_data_for_route()](https://developer.wordpress.org/reference/classes/wp_rest_server/get_data_for_route/)
 * Retrieves publicly-visible data for the route.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/get_data_for_route/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/get_data_for_route/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1606](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1606-L1686)
 * method[WP_REST_Server::set_status()](https://developer.wordpress.org/reference/classes/wp_rest_server/set_status/)
 * Sends an HTTP status code.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_server/set_status/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_rest_server/set_status/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1881](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1881-L1883)
 * hook[rest_dispatch_request](https://developer.wordpress.org/reference/hooks/rest_dispatch_request/)
 * Filters the REST API dispatch request result.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/rest_dispatch_request/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/rest_dispatch_request/#uses)
   | Source: [wp-includes/rest-api/class-wp-rest-server.php:1286](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rest-api/class-wp-rest-server.php#L1286-L1286)

1 [2](https://developer.wordpress.org/reference/files/wp-includes/rest-api/class-wp-rest-server.php/page/2/?output_format=md)

 [Next Page](https://developer.wordpress.org/reference/files/wp-includes/rest-api/class-wp-rest-server.php/page/2/?output_format=md)