generate functionWed, 01 Mar 2023

get content_type type from url

def get_content_type(url) response = HTTParty.get(url) response.headers['content-type'] end get_content_type('http://www.apple.com')

Questions about programming?Chat with your personal AI assistant