Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9103957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:45:03+00:00 2026-06-17T01:45:03+00:00

This is the code I am using to get the xml data from Apple’s

  • 0

This is the code I am using to get the xml data from Apple’s UK Top 10 rss feed:

xml = Net::HTTP.get_response(URI.parse('http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/topsongs/limit=10/xml')).body

Sinatra returns Errno::ECONNRESET at / - Connection reset by peer.
The RSS url I used for this was generated from the Apple RSS generator here. The error occurs with other countries’ rss feeds but does NOT occur with the default feed (US) found here. The backtrace is below:

/usr/lib/ruby/1.9.1/net/protocol.rb in read_nonblock
        @rbuf << @io.read_nonblock(BUFSIZE)
/usr/lib/ruby/1.9.1/net/protocol.rb in rbuf_fill
        @rbuf << @io.read_nonblock(BUFSIZE)
/usr/lib/ruby/1.9.1/net/protocol.rb in readuntil
          rbuf_fill
/usr/lib/ruby/1.9.1/net/protocol.rb in readline
      readuntil("\n").chop
/usr/lib/ruby/1.9.1/net/http.rb in read_status_line
        str = sock.readline
/usr/lib/ruby/1.9.1/net/http.rb in read_new
        httpv, code, msg = read_status_line(sock)
/usr/lib/ruby/1.9.1/net/http.rb in block in transport_request
          res = HTTPResponse.read_new(@socket)
/usr/lib/ruby/1.9.1/net/http.rb in catch
      res = catch(:response) {
/usr/lib/ruby/1.9.1/net/http.rb in transport_request
      res = catch(:response) {
/usr/lib/ruby/1.9.1/net/http.rb in request
      res = transport_request(req, &block)
/usr/lib/ruby/1.9.1/net/http.rb in request_get
      request(Get.new(path, initheader), &block)
/usr/lib/ruby/1.9.1/net/http.rb in block in get_response
          return http.request_get(uri.request_uri, &block)
/usr/lib/ruby/1.9.1/net/http.rb in start
          return yield(self)
/usr/lib/ruby/1.9.1/net/http.rb in get_response
        new(uri.hostname, uri.port).start {|http|
/home/sinatra/little.rb in block in <top (required)>
    xml = Net::HTTP.get_response(URI.parse('https://itunes.apple.com/gb/rss/topsongs/limit=5/xml')).body
/usr/lib/ruby/1.9.1/webrick/httpserver.rb in service
      si.service(req, res)
/usr/lib/ruby/1.9.1/webrick/httpserver.rb in run
          server.service(req, res)
/usr/lib/ruby/1.9.1/webrick/server.rb in block in start_thread
          block ? block.call(sock) : run(sock)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T01:45:04+00:00Added an answer on June 17, 2026 at 1:45 am

    Solved this myself. Turns out I was using the wrong Net:HTTP command. Should have been Net::HTTP.get('itunes.apple.com','/gb/rss/topsongs/limit=10/xml')

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this simple code to load data from other php page using get
I am currently using this code to get data from a URL: NSURL *url
I am using XML::Code to create some XML Data from a GET parameter received
currently i using this code in phonegap application var xmlhttp = new XMLHttpRequest(); xmlhttp.open(GET,http://192.168.1.19:8080/searchMobile?categoryRequest=true,
I am using raptureXML to extract data from my XML <forecast .../> tags. This
This code works fine when you remove the <data> wrapper, from the XML and
I'm trying to write this code using mostly arrays. I'm trying to get Correct
I'm using this code to get the contact list and then I want to
I'm using this code to get a drawable and use in a SetCompoundDrawablesWithIntrinsicBounds call:
I am using this code to get the background image of a div .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.