Hi there,
I’m working on building a simple little CLI program and ran into an issue on windows.
If I try to ‘crystal build’ on a file a with this function:
def download_hosts(uri)
HTTP::Client.get uri do |response|
File.open("hosts", "w") do |file|
IO.copy response.body_io, file
end
end
end
Then I get the following error:
Error: undefined method 'get' for HTTP::Client.class
This works fine on Linux/Mac/BSD with crystal 1.5.0 and 1.5.1 but I ran into an issue on the windows 11 developer VM. Scoop currently has Crystal 1.5.0.
I know that windows is not fully supported. I see Coordinate porting to Windows #5430, however I’m not sure what to do to fix the issue - if I’m running into a user error or partial implementation issue.
If someone can point me in the right direction on what needs to be fixed, I’d be most appreciative!
Thanks!