Class: Phocoder::HTTP::Typhoeus
- Inherits:
-
Object
- Object
- Phocoder::HTTP::Typhoeus
- Defined in:
- lib/phocoder/http/typhoeus.rb
Class Method Summary collapse
- .delete(url, options = {}) ⇒ Object
- .get(url, options = {}) ⇒ Object
- .perform(method, url, options = {}) ⇒ Object
- .post(url, options = {}) ⇒ Object
- .put(url, options = {}) ⇒ Object
Class Method Details
.delete(url, options = {}) ⇒ Object
17 18 19 |
# File 'lib/phocoder/http/typhoeus.rb', line 17 def self.delete(url, ={}) perform(:delete, url, ) end |
.get(url, options = {}) ⇒ Object
13 14 15 |
# File 'lib/phocoder/http/typhoeus.rb', line 13 def self.get(url, ={}) perform(:get, url, ) end |
.perform(method, url, options = {}) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/phocoder/http/typhoeus.rb', line 21 def self.perform(method, url, ={}) if .delete(:skip_ssl_verify) [:disable_ssl_peer_verification] = true end ::Typhoeus::Request.send(method, url, ) end |
.post(url, options = {}) ⇒ Object
5 6 7 |
# File 'lib/phocoder/http/typhoeus.rb', line 5 def self.post(url, ={}) perform(:post, url, ) end |
.put(url, options = {}) ⇒ Object
9 10 11 |
# File 'lib/phocoder/http/typhoeus.rb', line 9 def self.put(url, ={}) perform(:put, url, ) end |