Class: Xio::HTTP::Typhoeus
- Inherits:
-
Object
- Object
- Xio::HTTP::Typhoeus
- Defined in:
- lib/xio/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/xio/http/typhoeus.rb', line 17 def self.delete(url, ={}) perform(:delete, url, ) end |
.get(url, options = {}) ⇒ Object
13 14 15 |
# File 'lib/xio/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 28 29 30 31 32 33 34 35 36 |
# File 'lib/xio/http/typhoeus.rb', line 21 def self.perform(method, url, ={}) = .dup if .delete(:skip_ssl_verify) [:disable_ssl_peer_verification] = true end if ca_file = .delete(:ca_file) [:sslcert] = ca_file end if ca_path = .delete(:ca_path) [:capath] = ca_path end ::Typhoeus::Request.send(method, url, ) end |
.post(url, options = {}) ⇒ Object
5 6 7 |
# File 'lib/xio/http/typhoeus.rb', line 5 def self.post(url, ={}) perform(:post, url, ) end |
.put(url, options = {}) ⇒ Object
9 10 11 |
# File 'lib/xio/http/typhoeus.rb', line 9 def self.put(url, ={}) perform(:put, url, ) end |