The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Mojo::Pua - HTTP Client + Evo::Promises

VERSION

version 0.002

SYNOPSIS

  use Evo 'Mojo::Pua *; Mojo::IOLoop';

  pua_get('http://alexbyk.com')

    ->then(sub($res) { say $res->dom->at('title') })

    ->catch(sub($err) { say "$err", $err->res->dom->at('title') })

    ->finally(sub { Mojo::IOLoop->stop });


  Mojo::IOLoop->start;

DESCRIPTION

!!!ATTENTION This is first temporary release. Use it on your own risk.

This module is based on Mojo::UserAgent and allows you to use promises (Evo::Promise)

FUNCTIONS

pua_delete

pua_get

pua_head

pua_options

pua_patch

pua_post

pua_put

Perform non-blocking request and return a promise object. See Mojo::UserAgent, because this module right now is based on it See https://github.com/alexbyk/mojo-pua "examples" for more examples

AUTHOR

alexbyk <alexbyk.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by alexbyk.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.