Class: URL::TyHandler
Overview
Instance Attribute Summary
#url
Instance Method Summary
collapse
#initialize
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
|
#head(args = {}) ⇒ Object
27
28
29
30
|
# File 'lib/url/handlers/ty_handler.rb', line 27
def head(args={})
resp = Typhoesu::Request.head(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
|
#put(args = {}) ⇒ Object
22
23
24
25
|
# File 'lib/url/handlers/ty_handler.rb', line 22
def put(args={})
resp = Typhoeus::Request.put(url.to_s, :body => url.params.to_s(false))
make_str(resp)
end
|