if I use this code and manually insert the uri that the
sailthru.get_email method is generating is comes back with a response.

require "net/https"
require "uri"

uri = URI.parse("https://secure.com/";)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(uri.request_uri)

response = http.request(request)
response.body
response.status
response["header-here"] # All headers are lowercase

On Apr 5, 12:22 pm, Mlle <emsto...@gmail.com> wrote:
> Hmm, do you think it could have anything to do with SSL?
>
> On Apr 5, 12:16 pm, Colin Law <clan...@googlemail.com> wrote:
>
>
>
> > On 5 April 2011 17:11, Mlle <emsto...@gmail.com> wrote:
>
> > > Yes
>
> > Sorry that was my one an only (and useless) idea.
>
> > Colin
>
> > > On Apr 5, 12:07 pm, Colin Law <clan...@googlemail.com> wrote:
> > >> On 5 April 2011 16:56, Mlle <emsto...@gmail.com> wrote:
>
> > >> > Hi,
>
> > >> > I'm trying to set up Sailthru but get this error when I try to use it
> > >> > (get_email method):
>
> > >> > Sailthru::SailthruClientException: Unable to open stream:
> > >> >https://api.sailthru.com/email?format=json&api_key=....etc
>
> > >> Does the url open if you enter it into your browser?
>
> > >> Colin
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "Ruby on Rails: Talk" group.
> > > To post to this group, send email to rubyonrails-talk@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > rubyonrails-talk+unsubscr...@googlegroups.com.
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to