r.az91
r.az91

Reputation: 41

[Ruby]: Bad Uri Error

how can I fix the bad uri problem? I get these message.

The Code

puts "GET ?"
input = "https://www.xxxxxxxxxx.de/odata/"+gets+"/"


uri = URI.parse(input)

Upvotes: 0

Views: 110

Answers (1)

steenslag
steenslag

Reputation: 80065

The result of getsends with \n, a newline. Not wanted here, so chomp it:

 input = "https://www.xxxxxxxxxx.de/odata/" + gets.chomp + "/"

Upvotes: 3

Related Questions