_docker/lib/export/drupal_page_url_list_generator.rb
#
# Makes an HTTP get to fetch the contents of the sitemap.xml
#
Makes an HTTP get to fetch the contents of the sitemap.xml
Makes an HTTP get to fetch the contents of the sitemap . xml
def fetch_sitemap_contents
    sitemap_url = URI.parse("http://#{@drupal_host}/sitemap.xml")
    @log.info("Fetching sitemap content from '#{sitemap_url.to_s}'...")
    sitemap_contents = Net::HTTP.get_response(sitemap_url)
    raise StandardError.new("Failed to fetch sitemap.xml from '#{sitemap_url.to_s}'. Got status: '#{sitemap_contents.code}'") if sitemap_contents.code.to_i != 200
    @log.info("Successfully fetched sitemap from '#{sitemap_url.to_s}'")
    sitemap_contents.body
  end
def fetch_sitemap_contents sitemap_url = URI . parse ( "http://#{@drupal_host}/sitemap.xml" ) @log . info ( "Fetching sitemap content from '#{sitemap_url.to_s}'..." ) sitemap_contents = Net :: HTTP . get_response ( sitemap_url ) raise StandardError . new ( "Failed to fetch sitemap.xml from '#{sitemap_url.to_s}'. Got status: '#{sitemap_contents.code}'" ) if sitemap_contents . code . to_i != 200 @log . info ( "Successfully fetched sitemap from '#{sitemap_url.to_s}'" ) sitemap_contents . body end
Makes an HTTP get to fetch the contents of the sitemap.xml
Makes an HTTP get to fetch the contents of the sitemap . xml