This module adds support for the HTTP client L<AnyEvent::HTTP> to be used with the unified
programming interface provided by L<HTTP::AnyUA>.
+If installed, requests will return L<AnyEvent::Future> rather than L<Future>. This allows the use of
+the C<< ->get >> method to await a result.
+
=head1 SEE ALSO
=for :list
use HTTP::AnyUA::Util;
+my $future_class;
+BEGIN {
+ $future_class = 'Future';
+ eval 'use AnyEvent::Future'; ## no critic
+ $future_class = 'AnyEvent::Future' if !$@;
+}
+
+
=method options
$backend->options(\%options);
my ($method, $url, $args) = @_;
my %opts = $self->_munge_request($method, $url, $args);
- my $future = Future->new;
+ my $future = $future_class->new;
require AnyEvent::HTTP;
AnyEvent::HTTP::http_request($method => $url, %opts, sub {