Adding API for getting media type of a resource at an URL.