serve_request() публичный метод

Matches the current server URI to a route and runs the first matching callback then outputs a JSON representation of the returned value.
См. также: WP_REST_Server::dispatch()
С версии: 4.4.0
public serve_request ( string $path = null ) : false | null
$path string Optional. The request route. If not set, `$_SERVER['PATH_INFO']` will be used. Default null.
Результат false | null Null if not served and a HEAD request, false otherwise.
Пример #1
 public function serve_request($path = null)
     $result = parent::serve_request($path);
     $this->sent_body = ob_get_clean();
     return $result;