updated to send 'application/javascript' as the Content-Type