lib/mirage/web.rb in mirage-1.3.5 vs lib/mirage/web.rb in mirage-1.3.6
- old
+ new
@@ -9,21 +9,12 @@
@response.save_as(path)
end
end
def http_get url, params={}
- uri = URI.parse(url)
- if params[:body]
- response = using_mechanize do |browser|
- browser.put(url, params[:body])
- end
- else
- response = using_mechanize do |browser|
- browser.get(url, params)
- end
+ using_mechanize do |browser|
+ params[:body] ? browser.put(url, params[:body]) : browser.get(url, params)
end
-
- response
end
def http_post url, params={}
using_mechanize do |browser|
browser.post(url, params)