76 |
|
|
77 |
warn "# url $url params ",dump($params); |
warn "# url $url params ",dump($params); |
78 |
|
|
79 |
my $content_type = $server->request( $url, $params ); # fetch body |
my $request = $server->request( $url, $params ); # fetch body |
80 |
|
|
81 |
|
warn "# request ", dump( $request ); |
82 |
|
|
83 |
|
foreach ( 'content_type', 'code' ) { |
84 |
|
die "missing $_" unless defined $request->{$_}; |
85 |
|
} |
86 |
|
|
87 |
=for developer |
=for developer |
88 |
|
|
96 |
|
|
97 |
=cut |
=cut |
98 |
|
|
99 |
$tx->res->code(200); |
$tx->res->code( $request->{code} ); |
100 |
$tx->res->headers->content_type( $content_type ); |
$tx->res->headers->content_type( $request->{content_type} ); |
101 |
$tx->res->body( $body ); |
$tx->res->body( $body ); |
102 |
|
|
103 |
warn dump( $tx->res->headers ); |
warn dump( $tx->res->headers ); |