• Shaarli
  • Tag cloud
  • Picture wall
  • Daily
  • RSS
  • Login
4252 shaares
Filters

Migrating from LWP::UserAgent to Mojo::UserAgent : perl

QRCode

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;
https://www.reddit.com/r/perl/comments/8njtgi/migrating_from_lwpuseragent_to_mojouseragent/
September 16, 2021 at 2:59:33 PM EDT *
perl mojolicious
FILLER
Shaarli · The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community · Documentation
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community