Use JResponse class to handle headers and output