NAME
Net::ACME2::Curl
SYNOPSIS
To integrate with, e.g., Mojolicious:
my $promiser = Net::Curl::Promiser::Mojo->new();
my $acme2_ua = Net::ACME2::Curl->new($promiser);
my $acme = SomeNetACME2Subclass->new(
async_ua => $acme2_ua,
...,
);
my $tos_p = $acme->get_terms_of_service()->then(
sub { my $url = shift; ... },
);
… and so on.
DESCRIPTION
This class implements non-blocking I/O in Net::ACME2 via Net::Curl::Promiser. By using this module you can integrate Net::ACME2 into most popular Perl event loops.
STATUS
This module is currently EXPERIMENTAL. Caveat emptor.
METHODS
$obj = CLASS->new( $PROMISER )
Instantiates this class. Receives an instance of an appropriate Net::Curl::Promiser subclass for the environment.
$obj = OBJ->set_easy_callback( $CODEREF )
Installs a callback ($CODEREF) that OBJ will call after creating a Net::Curl::Easy instance. That instance is given as an argument to the callback. Via this method you can customize each HTTP request, e.g., to set timeouts, DNS resolution settings, a custom User-Agent string, and the like.