NAME

Kubernetes::REST::LWPIO - HTTP client using LWP::UserAgent

VERSION

version 1.001

SYNOPSIS

use Kubernetes::REST::LWPIO;

my $io = Kubernetes::REST::LWPIO->new(
    ssl_verify_server => 1,
    ssl_ca_file => '/path/to/ca.crt',
);

# Access the LWP::UserAgent for debugging (e.g. with LWP::ConsoleLogger)
use LWP::ConsoleLogger::Easy qw(debug_ua);
debug_ua($io->ua);

DESCRIPTION

HTTP client implementation using LWP::UserAgent for making Kubernetes API requests. This is the default IO backend for Kubernetes::REST.

The ua attribute is exposed so that debugging tools like LWP::ConsoleLogger can be attached to inspect HTTP traffic.

ssl_verify_server

Boolean. Whether to verify the server's SSL certificate. Defaults to true.

timeout

Timeout in seconds for HTTP requests. Defaults to 310 (slightly more than the Kubernetes default watch timeout of 300s).

ua

The underlying LWP::UserAgent instance. Access this to attach middleware such as LWP::ConsoleLogger for HTTP debugging.

call

my $response = $io->call($req);

Execute an HTTP request. Receives a fully prepared Kubernetes::REST::HTTPRequest (URL, headers, content all set). Returns a Kubernetes::REST::HTTPResponse.

call_streaming

my $response = $io->call_streaming($req, sub { my ($chunk) = @_; ... });

Execute an HTTP request with streaming response. The $data_callback is called with each chunk of data as it arrives.

Used internally by "watch" in Kubernetes::REST for the Watch API.

SEE ALSO

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/pplu/kubernetes-rest/issues.

IRC

Join #kubernetes on irc.perl.org or message Getty directly.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHORS

  • Torsten Raudssus <torsten@raudssus.de>

  • Jose Luis Martinez Torres <jlmartin@cpan.org> (JLMARTIN, original author, inactive)

COPYRIGHT AND LICENSE

This software is Copyright (c) 2019 by Jose Luis Martinez.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004