GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SEARCH::ELASTICSEARCH::ROLE::CLIENT::DIRECT (3)

.ds Aq ’

NAME

Search::Elasticsearch::Role::Client::Direct - Request parsing for Direct clients

CONTENTS

VERSION

version 2.00

DESCRIPTION

This role provides the single parse_request() method for classes which need to parse an API definition from Search::Elasticsearch::Role::API and convert it into a request which can be passed to perform_request() in Search::Elasticsearch::Transport.

METHODS

CWperform_request()



    $request = $client->parse_request(\%defn,\%params);



The %defn is a definition returned by api() in Search::Elasticsearch::Role::API with an extra key name which should be the name of the method that was called on the client. For instance if the user calls $client->search, then the name should be "search".

parse_request() will turn the parameters that have been passed in into a path (via path_init() in Search::Elasticsearch::Util::API::Path), a query-string hash (via qs_init in Search::Elasticsearch::Util::API::QS) and will through a body value directly.

<B>NOTE:B> If a path key is specified in the %params then it will be used directly, instead of trying to build path from the path template. Similarly, if a params key is specified in the %params, then it will be used as a basis for the query string hash. For instance:



    $client->perform_request(
        {
            method => GET,
            name   => new_method
        },
        {
            path   => /new/method,
            params => { foo => bar },
            body   => \%body
        }
    );



This makes it easy to add support for custom plugins or new functionality not yet supported by the released client.

AUTHOR

Clinton Gormley <drtech@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2015 by Elasticsearch BV.

This is free software, licensed under:



  The Apache License, Version 2.0, January 2004



Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SEARCH::ELASTICSEARCH::ROLE::CLIENT::DIRECT (3) 2015-10-28

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.