Should throw exception if content type is not set.

I've found an issue on setting body to POST request without setting content type first. I submit a patch to fix it.