<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Mojolicious::Plugin::Subdispatch
================================

This plugin creates a `subdispatch` helper, which helps you creating a request
for your actions, and returns the response object with your fully rendered
HTML content. The interface has some similarities to Mojo::UserAgent:
just use your request method (DELETE, GET, HEAD, POST, PUT) as the method name
and pass the same arguments as you would do for `url_for`:

    plugin 'Subdispatch';

    [web app stuff...]

    my $html = app-&gt;subdispatch-&gt;get('route_name', foo =&gt; 'bar')-&gt;body;

To build a post request with data, append the data hash at the end:

    my $res = app-&gt;subdispatch-&gt;post('route', foo =&gt; 'bar', {with =&gt; 'data'});

If you want to access the transaction object around the response, use the
subdispatch helper with arguments like this:

    my $tx = app-&gt;subdispatch(GET  =&gt; 'route', foo =&gt; 'bar');
    my $tx = app-&gt;subdispatch(POST =&gt; 'route', foo =&gt; 'bar', {with =&gt; 'data'});

This is an early version and may change without warning. I'll use it to create
static HTML pages from a Mojolicious blog, but if you find another good way
to use it, please let me know!

Author
------

(c) Mirko Westermeier, &lt;mail@memowe.de&gt;

Licensed under the same terms as Perl itself.
</pre></body></html>