Created
February 4, 2019 14:57
-
-
Save marcusramberg/d25755fe6c0f6d690fb1b197f64265de to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package StatusTest::Controller::Example; | |
use Mojo::Base 'Mojolicious::Controller'; | |
# This action will render a template | |
sub test { | |
my $self=shift; | |
$self->render_later; | |
$self->ua->get('/internal', sub { | |
my ($ua,$tx) = @_; | |
$self->render($tx->res->json('/res')); | |
}); | |
} | |
sub internal { | |
my $self=shift; | |
$self->render(json=>{res=>2}); | |
} | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment