lib/jkl/rest_client.rb in jakal-0.1.7 vs lib/jkl/rest_client.rb in jakal-0.1.8

- old
+ new

@@ -2,11 +2,12 @@ require 'hpricot' module Jkl class << self - def post_to(uri, post_args) + def post_to(url, post_args = {}) begin + uri = URI.parse(url) resp, data = Net::HTTP.post_form(uri, post_args) data rescue URI::InvalidURIError => e puts("WARN: Invalid URI: #{e}") rescue SocketError => e