Hi guys!
I`m trying to make 5 requests at once and here is my code:
require "http/client"
channel = Channel(String).new
list = %w[
https://www.akitaonrails.com/
https://citizen428.net/
https://crystal-lang.org/
https://www.akitaonrails.com/
https://citizen428.net/
https://crystal-lang.org/
]
list.each do |url|
spawn do
response = HTTP::Client.get(url)
channel.send response.body
end
end
puts channel.receive
Instead I have only 1 response)