use Modern::Perl;
use CGI qw ( -utf8 );
use JSON qw(encode_json);
use JSON qw(to_json);
use C4::Auth qw(checkauth);
use C4::Output;
use Koha::Logger;
sub response {
my ($data, $status_line) = @_;
$status_line ||= "200 OK";
output_with_http_headers $cgi, undef, encode_json($data), 'json', $status_line;
output_with_http_headers $cgi, undef, to_json($data), 'json', $status_line;
exit;
}
-