Create header before going into JSON return function.