1Search::Elasticsearch::URsoelre:C:oCnltireiSnbetua:tr:ecDdhi:rP:eeEcrltla(s3Dt)oiccusmeeanrtcaht:i:oRnole::Client::Direct(3)
2
3
4

NAME

6       Search::Elasticsearch::Role::Client::Direct - Request parsing for
7       Direct clients
8

VERSION

10       version 7.715
11

DESCRIPTION

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

METHODS

20   "perform_request()"
21           $request = $client->parse_request(\%defn,\%params);
22
23       The %defn is a definition returned by "api()" in
24       Search::Elasticsearch::Role::API with an extra key "name" which should
25       be the name of the method that was called on the client.  For instance
26       if the user calls "$client->search", then the "name" should be
27       "search".
28
29       "parse_request()" will turn the parameters that have been passed in
30       into a "path" (via "path_init()" in
31       Search::Elasticsearch::Util::API::Path), a query-string hash (via
32       "qs_init" in Search::Elasticsearch::Util::API::QS) and will through a
33       "body" value directly.
34
35       NOTE: If a "path" key is specified in the %params then it will be used
36       directly, instead of trying to build path from the path template.
37       Similarly, if a "params" key is specified in the %params, then it will
38       be used as a basis for the query string hash.  For instance:
39
40           $client->perform_request(
41               {
42                   method => 'GET',
43                   name   => 'new_method'
44               },
45               {
46                   path   => '/new/method',
47                   params => { foo => 'bar' },
48                   body   => \%body
49               }
50           );
51
52       This makes it easy to add support for custom plugins or new
53       functionality not yet supported by the released client.
54

AUTHOR

56       Enrico Zimuel <enrico.zimuel@elastic.co>
57
59       This software is Copyright (c) 2021 by Elasticsearch BV.
60
61       This is free software, licensed under:
62
63         The Apache License, Version 2.0, January 2004
64
65
66
67perl v5.34.0                    Se2a0r2c2h-:0:1E-l2a1sticsearch::Role::Client::Direct(3)
Impressum