#!/usr/bin/env perl
use Mojolicious::Lite;
post '/' => sub {
my $self = shift;
my $upload = $self->param('model');
my $name = $upload->filename;
warn $name;
$self->render(text => 'OK');
};
app->start;
use Mojo::UserAgent::Transactor;
use Data::Dumper;
my $t = Mojo::UserAgent::Transactor->new;
my $tx = $t->tx(POST => 'http://127.0.0.1:3000' => form => {model => {file => 'stick.stl'}});
my $result = $tx->res->to_string;
warn Dumper $result;
$VAR1 = 'HTTP/1.1 404 Not Found
Content-Length: 0
Date: Tue, 21 Apr 2015 05:37:21 GMT
';
[Tue Apr 21 09:33:24 2015] [info] Listening at "http://*:3000".
Server available at http://127.0.0.1:3000.
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious...@googlegroups.com.
To post to this group, send email to mojol...@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.