I wondering if something like the below could be possible to do with Mojo::UserAgent :
let's say i have the below code :
my $ua = Mojo::UserAgent->new;
my $res = $ua->get('mojolicious.org/perldoc')->result;
is it possible to intercept Mojo::UserAgent request and send it to other web client which know javascript where its result sent back as as Mojo::Transaction::HTTP ($res above ),where the user can continue use Mojo::UserAgent interface results .
i.e i want the following :
Mojo::UserAgent-> HTTP request -> intercept the HTTP Request -> Send the HTTP Request to web client support javascript like WWW::Chrome::Mechanize or FireFox::Marionette -> the JavaScript Web Client do the request -> the returned result intercepted and changed to Mojo::Transaction::HTTP
or
Mojo::UserAgent -> non blocking HTTP request ->non blocking HTTP response -> send to embedded web browser like webkit -> get the result as Mojo::Transaction::HTTP
Any ideas /examples how to let Mojo::UserAgent work with javascript?