Class: ComerDeTapas::Fetcher

Inherits:
Object
  • Object
show all
Includes:
Celluloid::IO
Defined in:
lib/comer_de_tapas/fetcher.rb

Instance Method Summary collapse

Instance Method Details

#fetch(url, cookie, query = {}) ⇒ Object

Fetch url with given cookie, and query string (optional)

Options Hash (query):

  • (Hash)


11
12
13
14
# File 'lib/comer_de_tapas/fetcher.rb', line 11

def fetch url, cookie, query={}
  require 'http'
  HTTP.with('Cookie' => cookie).get(url, ssl_socket_class: Celluloid::IO::SSLSocket, params: query)
end