Class: Mpex::Http
- Inherits:
-
Object
- Object
- Mpex::Http
- Defined in:
- lib/mpex/http.rb
Class Method Summary collapse
Class Method Details
.get(url, url_extension = "") ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/mpex/http.rb', line 17 def self.get(url, url_extension="") begin uri = mpex_uri(url).merge(url_extension) return Net::HTTP.get(uri) rescue Exception => ex suggest_proxies raise ex end end |
.post_form(url, params) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/mpex/http.rb', line 7 def self.post_form(url, params) begin res = Net::HTTP.post_form(mpex_uri(url), params) return res.body.to_s rescue Exception => ex suggest_proxies raise ex end end |