Factorize HTTP Content-Type getter