<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Search::Elasticsearch::Cxn::NetCurl - A Cxn implementation which uses
    libcurl via Net::Curl

VERSION
    version 5.00

DESCRIPTION
    Provides an HTTP Cxn class based on Net::Curl. The "NetCurl" Cxn class
    is very fast and uses persistent connections but requires XS and
    "libcurl".

    This class does Search::Elasticsearch::Role::Cxn, whose documentation
    provides more information.

CONFIGURATION
  "connect_timeout"
    Unlike most HTTP backends, Net::Curl accepts a separate
    "connect_timeout" parameter, which defaults to 2 seconds but can be
    reduced in an environment with low network latency.

  Inherited configuration
    From Search::Elasticsearch::Role::Cxn

    *   node

    *   max_content_length

    *   deflate

    *   deflate

    *   request_timeout

    *   ping_timeout

    *   dead_timeout

    *   max_dead_timeout

    *   sniff_request_timeout

    *   sniff_timeout

    *   handle_args

    *   handle_args

SSL/TLS
    Search::Elasticsearch::Cxn::NetCurl does no validation of remote hosts
    by default.

    This behaviour can be changed by passing the "ssl_options" parameter
    with any options accepted by Net::Curl (see
    &lt;http://curl.haxx.se/libcurl/c/curl_easy_setopt.html&gt;).

    For instance, to check that the remote host has a trusted certificate,
    and to avoid man-in-the-middle attacks, you could do the following:

        use Search::Elasticsearch;
        use Net::Curl::Easy qw(
            CURLOPT_CAINFO
        );

        my $es = Search::Elasticsearch-&gt;new(
            cxn   =&gt; 'NetCurl',
            nodes =&gt; [
                "https://node1.mydomain.com:9200",
                "https://node2.mydomain.com:9200",
            ],
            ssl_options =&gt; {
                CURLOPT_CAINFO()  =&gt; '/path/to/cacert.pem'
            }
        );

    If the remote server cannot be verified, an Search::Elasticsearch::Error
    will be thrown.

    If you want your client to present its own certificate to the remote
    server, then use:

        use Net::Curl::Easy qw(
            CURLOPT_CAINFO
            CURLOPT_SSLCERT
            CURLOPT_SSLKEY
        );

        my $es = Search::Elasticsearch-&gt;new(
            cxn   =&gt; 'NetCurl',
            nodes =&gt; [
                "https://node1.mydomain.com:9200",
                "https://node2.mydomain.com:9200",
            ],
            ssl_options =&gt; {
                CURLOPT_CAINFO()      =&gt; '/path/to/cacert.pem'
                CURLOPT_SSLCERT()     =&gt; '/path/to/client.pem',
                CURLOPT_SSLKEY()      =&gt; '/path/to/client.pem',
            }
        );

METHODS
  "perform_request()"
        ($status,$body) = $self-&gt;perform_request({
            # required
            method      =&gt; 'GET|HEAD|POST|PUT|DELETE',
            path        =&gt; '/path/of/request',
            qs          =&gt; \%query_string_params,

            # optional
            data        =&gt; $body_as_string,
            mime_type   =&gt; 'application/json',
            timeout     =&gt; $timeout
        });

    Sends the request to the associated Elasticsearch node and returns a
    $status code and the decoded response $body, or throws an error if the
    request failed.

  Inherited methods
    From Search::Elasticsearch::Role::Cxn

    *   scheme()

    *   is_https()

    *   userinfo()

    *   default_headers()

    *   max_content_length()

    *   build_uri()

    *   host()

    *   port()

    *   uri()

    *   is_dead()

    *   is_live()

    *   next_ping()

    *   ping_failures()

    *   mark_dead()

    *   mark_live()

    *   force_ping()

    *   pings_ok()

    *   sniff()

    *   process_response()

SEE ALSO
    *   Search::Elasticsearch::Role::Cxn

    *   Search::Elasticsearch::Cxn::Hijk

    *   Search::Elasticsearch::Cxn::LWP

    *   Search::Elasticsearch::Cxn::HTTPTiny

BUGS
    This is a stable API but this implemenation is new. Watch this space for
    new releases.

    If you have any suggestions for improvements, or find any bugs, please
    report them to
    &lt;http://github.com/elasticsearch/elasticsearch-perl/issues&gt;. I will be
    notified, and then you'll automatically be notified of progress on your
    bug as I make changes.

SUPPORT
    You can find documentation for this module with the perldoc command.

        perldoc Search::Elasticsearch::Cxn::NetCurl

    You can also look for information at:

    *   GitHub

        &lt;http://github.com/elasticsearch/elasticsearch-perl&gt;

    *   CPAN Ratings

        &lt;http://cpanratings.perl.org/d/Search::Elasticsearch::Cxn::NetCurl&gt;

    *   Search MetaCPAN

        &lt;https://metacpan.org/module/Search::Elasticsearch::Cxn::NetCurl&gt;

    *   IRC

        The #elasticsearch &lt;irc://irc.freenode.net/elasticsearch&gt; channel on
        "irc.freenode.net".

    *   Mailing list

        The main Elasticsearch mailing list
        &lt;http://www.elastic.co/community&gt;.

AUTHOR
    Clinton Gormley &lt;drtech@cpan.org&gt;

COPYRIGHT AND LICENSE
    This software is Copyright (c) 2016 by Elasticsearch BV.

    This is free software, licensed under:

      The Apache License, Version 2.0, January 2004

</pre></body></html>