Sailthru-client gem

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

I’m running the app locally, so do I have to do anything in particular
to open an external stream?

On 5 April 2011 16:56, Mlle [email protected] 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

On 5 April 2011 17:11, Mlle [email protected] wrote:

Yes

Sorry that was my one an only (and useless) idea.

Colin

Hmm, do you think it could have anything to do with SSL?

Yes

On Tue, Apr 5, 2011 at 10:56 AM, Mlle [email protected] 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

Please post the full error you are getting. Since you can open this link
via
browser and net/http library there is something else going on and no one
can
tell what it is from this truncated error message.

B.

how to send multiple email in sailthru…please anyone help me

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs