I think you're inverting the bodyType logic here; it was checking for text/html before...