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

  • SEARCH
  • Home
  • 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 1034555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:24:38+00:00 2026-05-16T14:24:38+00:00

Hey all, I’ve got a client that is integrating a Rails 1.2.6 site with

  • 0

Hey all, I’ve got a client that is integrating a Rails 1.2.6 site with another site that exposes services RESTfully. Upgrading to Rails 2.x is not an option at this time. Does anyone have recommendations for methods other than direct Net::HTTP calls to communicate with the REST service? Techniques or Gem recommendations are welcome, but most of the gems I’ve seen seem to have a dependency on ActiveSupport 2.x, which I understand to be incompatible with Rails 1.x.

Thanks in advance for any input you can provide.

  • 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-05-16T14:24:39+00:00Added an answer on May 16, 2026 at 2:24 pm

    Thanks Chris Heald for your response. I did end up using Net::HTTP because it was more straightforward than I thought it was in the end. HTTParty looks like it could make this easier still, but for the benefit of future people with this problem, here’s what I did.

    # Assume @user_name and @password were previously declared to be the 
    # appropriate basic auth values and that the connection is open as @connection
      def put(path, body, header={})
        request = Net::HTTP::Put.new(path, header.merge({'Accept' => 'application/xml,application/json', 'Content-type'=>'application/json'}))
        request.basic_auth(@user_name, @password)
        @connection.request(request, body).body
      end
    
      def post(path, body, header={})
        request = Net::HTTP::Post.new(path, header.merge({'Accept' => 'application/xml,application/json', 'Content-type'=>'application/json'}))
        request.basic_auth(@user_name, @password)
        @connection.request(request, body).body
      end 
    
      def get(path, header={})
        request = Net::HTTP::Get.new(path)
        request.basic_auth(@user_name, @password)
        @connection.request(request).body   
      end
    

    I then called JSON::parse() on the output of these methods and got a hash representing the JSON that I could use as I saw fit.

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

Sidebar

Related Questions

Hey all. I'm integrating a CLR/Assembly-based sproc replacement for an existing sproc that lives
Hey all, weird question. My company has an application from another company that records
Hey all. I'm reading from one sql-format file to another, and two bytes in
Hey all of you at Stackoverflow. I got this incredibly annoying problem. I try
Hey all, I've created a loading/splash screen that loads at the beginning of my
Hey all I just finished: http://www.mongodb.org/display/DOCS/Rails+3+-+Getting+Started#Rails3-GettingStarted-InstalltheRails3 But its not quite suited for ubuntu 10.04...
Hey all! I converted my 2.0 site to 3.5 so I can take advantage
Hey all i have an XML file that i am trying to loop though.
Hey all. Ive got a headache trying to get my head around this. I
Hey all, have a slight problem here. In CakePHP I have a controller that

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.