You are here

protected function RESTServer::getResponseFormatFromURL in Services 7.3

Retrieve formatter from URL. If format is in the path, we remove it from $canonical_path.

For example <endpoint>/<path>.<format>

Parameters

$canonical_path:

Return value

string

1 call to RESTServer::getResponseFormatFromURL()
RESTServer::getResponseFormatter in servers/rest_server/includes/RESTServer.inc
Response formatter is responsible for encoding the response.

File

servers/rest_server/includes/RESTServer.inc, line 223
Class for handling REST calls.

Class

RESTServer
@file Class for handling REST calls.

Code

protected function getResponseFormatFromURL($canonical_path) {
  return $this->negotiator
    ->getResponseFormatFromURL($canonical_path);
}