Migrating from LWP::UserAgent to Mojo::UserAgent : perl
I'm in the process of migrating my development process from the old comfortable tools I've been using for the last handful of years over to Mojo-based code whenever possible. I'd like to thank everyone in this subreddit that's helped me in on this journey of discovery in prior posts, and hope that I can continue to benefit from the wisdom of the collective.
Mojolicious lets you do a lot of things more concisely than some other frameworks/modules, too. This type of setup/flow is normally what I use in my client-side scripts:
my $ua = Mojo::UserAgent->new;
my $post_result = $ua->post(
$endpoint,
{ SOAPAction => $soapaction, 'Content-Type' => 'text/xml' }, # headers
$message # request body
)->result;
September 16, 2021 at 2:59:33 PM EDT
*
FILLER