You can use other HTTP libraries in Shoes too. Here's an example:
Shoes.setup do
gem 'httpclient'
end
require 'httpclient'
require 'openssl/ssl'
Shoes.app do
para HTTPClient.new.get_content('https://www.jalot.com/')
end
Kyle
On Mar 31, 2009, at 6:10 PM, Edward Heil wrote:
Is there any particular trick to using download() with SSL that I'm
missing?
I tried this:
Shoes.app do
stack do
button "go" do
@thing.text = "fetching..."
download( 'https://www.jalot.com/') do |dl|
self.clipboard = @thing.text = dl.response.body
end
end
@thing = para ""
end
end
and got this:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not
understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server
port.<br />
Instead use the HTTPS scheme to access this URL, please.<br />
<blockquote>Hint: <a href="https://jalot.com/"><b>https://jalot.com/
</b></a></blockquote></p>
<hr>
<address>Apache/2.0.54 (Fedora) Server at jalot.com Port 443</address>
</body></html>