private function processApiMethod(SfRequest $request)
    {
        // Try parse JSON
        $content = $request->getContent();

        if (!$content) {
            throw new MissingHttpContentException('Missing HTTP content.');
        }

        $query = @json_decode($content, true);

        if (false === $query) {
            throw JsonParseException::create(json_last_error());
        }

        return $this->processApiQuery($query);
    }
private function processApiMethod(SfRequest $request)
    {
        // Try parse JSON
        $content = $request->getContent();

        if (!$content) {
            throw new MissingHttpContentException('Missing HTTP content.');
        }

        $query = @json_decode($content, true);

        if (false === $query) {
            throw JsonParseException::create(json_last_error());
        }

        return $this->processApiQuery($query);
    }
private function processApiMethod ( SfRequest $ request ) { // Try parse JSON $ content = $ request -> getContent ( ) ; if ( ! $ content ) { throw new MissingHttpContentException ( 'Missing HTTP content.' ) ; } $ query = @ json_decode ( $ content , true ) ; if ( false === $ query ) { throw JsonParseException :: create ( json_last_error ( ) ) ; } return $ this -> processApiQuery ( $ query ) ; }
Process API method

@param SfRequest $request

@return JsonResponse

@throws \Exception
Process API method