lib/messenger/web.rb in messenger-0.3.0 vs lib/messenger/web.rb in messenger-0.3.1

- old
+ new

@@ -1,6 +1,6 @@ -require 'typhoeus' +require 'httparty' class Messenger::Web def self.valid_url?(url) !!URI.parse(url) @@ -13,10 +13,10 @@ # https://user:pass@example.com # # The body of the message is posted as the body of the request, not the query. def self.deliver(url, body, options={}) raise Messenger::URLError, "The URL provided is invalid" unless valid_url?(url) - response = Typhoeus::Request.post(url, options.merge(:body => body)) + response = HTTParty.post(url, options.merge(:body => body)) Messenger::Result.new(success?(response), response) end def self.obfuscate(url) raise Messenger::URLError, "The URL provided is invalid" unless valid_url?(url)