application/xml'
Search the index for B<bar>:
% curl 'http://localhost:5000/search?q=bar&t=JSON'
% curl 'http://localhost:5000/search?q=bar&t=XML'
Read the usage statement:
% dezi -h
=hea
package Dezi::Server::About;
use strict;
use warnings;
use Carp;
use JSON;
use Search::Tools::XML;
use Scalar::Util qw( blessed );
our $VERSION = '0.004003';
sub new {
my $class = shift;
=> 'Peter Karman <karpet@dezi.org>',
api_base_url => "$uri",
api_format => [qw( JSON ExtJS XML Tiny )],
methods => $spore_methods,
engine => ref( $server->
$about->{admin} = $uri . $admin_path;
}
my $resp
= $format eq 'json'
? to_json($about)
: Search::Tools::XML->perl_to_xml( $about, 'dezi', 1 );
return [
tes all search responses to L<Search::OpenSearch::Response> objects.
The default response type is JSON. You can use the C<t> GET param
to change that type per-request, or use the C<default_response_fo
h::Response>.
All non-idempotent responses use the JSON format, and indicate
both the C<success> boolean and C<code> HTTP status as part of the
JSON string.
=head1 FEEDBACK
The evolution of the Dez
;
$engine_config->{link} ||= $search_path;
$engine_config->{default_response_format} ||= 'JSON';
$engine_config->{debug} = $args->{debug} || $self->debug;
return $engine_config;
}
sub
# see Search::OpenSearch::Engine
engine_config => {
default_response_format => 'JSON',
# could be any Search::OpenSearch::Engine::* class
type => 'Lucy',
ntent-Type: application/xml'
Search the index:
% curl 'http://localhost:5000/search?q=bar&t=JSON'
% curl 'http://localhost:5000/search?q=bar&t=XML'
=head1 DESCRIPTION
Dezi is a search platfor