Add api key to every request in ActiveResource
        Posted  
        
            by Jared
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jared
        
        
        
        Published on 2010-05-27T04:16:58Z
        Indexed on 
            2010/05/27
            4:21 UTC
        
        
        Read the original article
        Hit count: 418
        
I have 2 RESTful Rails apps I'm trying to make talk to each other. Both are written in Rails 3 (beta3 at the moment). The requests to the service will require the use an api key which is just a param that needs to be on every request. I can't seem to find any information on how to do this.
You define the url the resource connects to via the site= method. There should be an equivalent query_params= method or similar.
There is one good blog post I found related to this and it's from October 2008, so not exactly useful for Rails 3.
© Stack Overflow or respective owner