NAME

Net::Async::Graphite::HTTPClient - Handle HTTP for Net::Async::Graphite

SYNOPSIS

with 'Net::Async::Graphite::HTTPClient';

DESCRIPTION

Don't use this module directly, use Net::Async::Graphite and create objects using its new method in the normal way. Those objects will include the functionality documented here.

This role brings the capacity to communicate with an HTTP server.

It's mixed in by Net::Async::Graphite::API and uses a Net::Async::HTTP object to do its work.

BUGS

_http is added to IO::Async's loop but there's no mechanism to remove it. For now _http exists until the application exits but if that ever changes this will be the source of memory leaks at best.

ROLE

This role requires the IO::Async functionality defined in Net::Async::Graphite::Async (essentially just a _loop attribute to hold the IO::Async::Loop object).

ATTRIBUTES

max_connections (read-only)

The maximum number of simultaneous HTTP connections to allow. See max_connections_per_host in Net::Async::HTTP.

Default: 0; no limit.

username (read-only, predicable)
password (read-only, predicable)

The username and password to authenticate with.

In addition to the predicates has_username and has_password there is has_auth which returns true if there is a username and a password.

_http (read-only)

The Net::Async::HTTP object which performs the HTTP queries.

PRIVATE METHODS

_download ($uri)

Return (a Future which completes with) an HTTP::Response object when the HTTP request has finished.

SEE ALSO

Net::Async::Graphite

Net::Async::Graphite::Async

Net::Async::HTTP

Future

Moo

AUTHOR

Matthew King <matthew.king@cloudbeds.com>