class DoList::UrlParser

Public Class Methods

parse_url(url) click to toggle source
# File lib/do-list/url_parser.rb, line 4
def parse_url(url)
  URI.parse(url)
end
post_http(http, uri, body, headers) click to toggle source
# 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) click to toggle source
# 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