Class: Glib::JsonCrawler::ActionHttp

Inherits:
ActionCrawler show all
Defined in:
lib/glib/json_crawler/action_crawlers/action_http.rb

Instance Method Summary collapse

Methods inherited from ActionCrawler

#click, #crawl, #perform

Constructor Details

#initialize(method, http, args, controller) ⇒ ActionHttp

Returns a new instance of ActionHttp.



4
5
6
7
8
# File 'lib/glib/json_crawler/action_crawlers/action_http.rb', line 4

def initialize(method, http, args, controller)
  @http = http
  json = @http.send(method, args['url'], controller, args.fetch('formData', {}))
  perform(json['onResponse'])
end