title: Interfacing with a third-party API in Rails? ( Opening URLs and Parsing XML/JSON )
body: <p>I'm working on a Rails project which will need to interface with multiple third-party APIs.  I'm pretty new to Rails, and I've never done this before, so I'm lacking some basic information here.  Specifically, <strong>What is the preferred Rails way of simply querying an external URL?</strong></p>
  
  <p>In the PHP world, it was cURL.  You take whatever the resource URL is, throw cURL at it, and start processing the response, whether it be XML, JSON, etc.</p>
  
  <p><strong>So, what's the cURL equivalent in Rails?</strong>  While we're at it, <strong>what is the preferred method of parsing XML and JSON responses?</strong>  My instincts are to Google around for some Ruby gems to get the job done, but this is such a practical problem that I wouldn't be surprised if the Rails community had already worked out a tried-and-true solution to this kind of problem.</p>
  
  <p>If it's of any contextual value, I plan to run these third-party API interactions as nightly cronjobs, probably all packaged up as custom rake tasks.</p>
  
  <p>Thanks for sharing your expertise.</p>