Class: Fed::Http::Curb
- Inherits:
-
Object
- Object
- Fed::Http::Curb
- Defined in:
- lib/fed/http/curb.rb
Class Method Summary collapse
Class Method Details
.get(url) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/fed/http/curb.rb', line 5 def self.get(url) c = Curl.get(url) do|http| http.headers['User-Agent'] = Fed::Http.[:user_agent] http.follow_location = true end c.status == "200 OK" ? c.body_str : c.status.to_i end |