generate functionMon, 27 Feb 2023

generate url with http auth user and password in url

def generate_url(user, password, url) return "http://#{user}:#{password}@#{url}" end generate_url('john', '1234', 'google.com')

Questions about programming?Chat with your personal AI assistant