set content-type for api endpoint