WordPress at a glance
function is not described

rest_handle_options_request() WP 4.4.0

Handles OPTIONS requests for the server.

This is handled outside of the server code, as it doesn't obey normal route mapping.

No Hooks.

Return

WP_REST_Response. Modified response, either response or null to indicate pass-through.

Usage

rest_handle_options_request( $response, $handler, $request );
$response(mixed) (required)
Current response, either response or null to indicate pass-through.
$handler(WP_REST_Server) (required)
ResponseHandler instance (usually WP_REST_Server).
$request(WP_REST_Request) (required)
The request that was used to make current response.

Code of rest handle options request: wp-includes/rest-api.php VER 5.1.1

<?php
function rest_handle_options_request( $response, $handler, $request ) {
	if ( ! empty( $response ) || $request->get_method() !== 'OPTIONS' ) {
		return $response;
	}

	$response = new WP_REST_Response();
	$data     = array();

	foreach ( $handler->get_routes() as $route => $endpoints ) {
		$match = preg_match( '@^' . $route . '$@i', $request->get_route() );

		if ( ! $match ) {
			continue;
		}

		$data = $handler->get_data_for_route( $route, $endpoints, 'help' );
		$response->set_matched_route( $route );
		break;
	}

	$response->set_data( $data );
	return $response;
}