client = HTTPClient.new
response = client.post('https://httpbin.org/post', 'string')
client = HTTPClient.new
response = client.post('https://httpbin.org/post', 'string')
if
URI.parse(address).host =~ Resolv::IPv4::Regex || address =~ %r{^(http|https)://[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?/.*)?$}ix
true
else
false
end
'foo bar 42 $%$%'
он выкидывает ошибку, а не false