Class: URL::TyHandler

Inherits:
RequestHandler show all
Defined in:
lib/url/handlers/ty_handler.rb

Overview

Typhoeus handler

Instance Attribute Summary

Attributes inherited from RequestHandler

#url

Instance Method Summary collapse

Methods inherited from RequestHandler

#initialize

Constructor Details

This class inherits a constructor from URL::RequestHandler

Instance Method Details

#delete(args = {}) ⇒ Object



17
18
19
20
# File 'lib/url/handlers/ty_handler.rb', line 17

def delete(args={})
  resp = Typhoeus::Request.delete(url.to_s)
  make_str(resp)
end

#get(args = {}) ⇒ Object



5
6
7
8
9
# File 'lib/url/handlers/ty_handler.rb', line 5

def get(args={})
  resp = Typhoeus::Request.get(url.to_s)
  
  make_str(resp)
end

#post(args = {}) ⇒ Object



11
12
13
14
15
# File 'lib/url/handlers/ty_handler.rb', line 11

def post(args={})
  resp = Typhoeus::Request.post(url.to_s(:params => false), :params => url.params)
  
  make_str(resp)
end