- bless { nr => 0, cb => $cb, ctx => $ctx }, $class;
+ bless { nr => 0, cb => $cb || *close, ctx => $ctx }, $class;
+}
+
+sub response {
+ my ($class, $ctx, $code, $cb) = @_;
+ [ $code, [ 'Content-Type', 'text/html; charset=UTF-8' ],
+ $class->new($ctx, $cb) ]