public function highlight(
        $content, $contentType, $class, $query,
        $params = array(), $structured = false
    )
    {
        // Install the API extension
        $resource = "resources/highlight";
        $this->client->installExtension("config/" . $resource, array(
            'method' => 'post',
            'post:q?' => 'string',
            'post:class' => 'string',
            'post:structuredQuery?' => 'string',
            'post:c' => 'string',
            'post:ct' => 'string',
            'post:provider?' => 'string'
        ), "highlight.xqy");

        // Use it
        $this->query = (string)$query;
        $params = array_merge(array(
            ($structured ? 'structuredQuery' : 'q') => $this->query,
            'c' => $content,
            'ct' => $contentType,
            'class' => $class
        ), $this->getParams(), $params);

        $request = new RESTRequest('POST', $resource, $params, "", array(
            'Content-type' => 'application/x-www-form-urlencoded'
        ));

        try {
            $response = $this->client->send($request);
            //print_r($response);
            $results = $response->getBody();
            if ($contentType === "text/plain") {
                return $results;
            } else {
                // Strip off XML decl
                return substr( $results, strpos($results, "\n")+1 );
            }
        } catch(Exception $e) {
            echo $e->getMessage() . ' in ' . $e->getFile() .
            ' on line ' . $e->getLine() . PHP_EOL;
        }
    }