Class: DoList::UrlParser
- Inherits:
-
Object
- Object
- DoList::UrlParser
- Defined in:
- lib/do-list/url_parser.rb
Class Method Summary collapse
Class Method Details
.parse_url(url) ⇒ Object
4 5 6 |
# File 'lib/do-list/url_parser.rb', line 4 def parse_url(url) URI.parse(url) end |
.post_http(http, uri, body, headers) ⇒ Object
14 15 16 17 |
# File 'lib/do-list/url_parser.rb', line 14 def post_http(http, uri, body, headers) result = http.post(uri.path, body, headers) Nokogiri::XML(result.body).remove_namespaces! end |
.request_http(uri) ⇒ Object
8 9 10 11 12 |
# File 'lib/do-list/url_parser.rb', line 8 def request_http(uri) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = false http end |