TypeError: Cannot set properties of undefined (setting 'content-type')