Subject: | Use text/plain in response when client does not accept application/json |
Hi,
Thanks for the module, it came just in time for me :-)
I have a feature request:
For jQuery-File-Upload to work with IE, server must send JSON response with text/plain content type instead of default application/json.
Something like (especially for Catalyst):
my $content_type = 'text/plain';
if ($c->req->headers->header('Accept') =~ qr(application/json) ) {
$content_type = 'application/json';
}
I created my own verision of print_response method with above functionality, but I guess everyone needs that sooner or later.
Regards,
Lukas Rampa