Update templateFactory.js

added charset utf-8 to accept header