URL of the website calling Restlet API
        Posted  
        
            by 
                Christopher McCann
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Christopher McCann
        
        
        
        Published on 2011-01-06T21:57:06Z
        Indexed on 
            2011/01/07
            2:54 UTC
        
        
        Read the original article
        Hit count: 302
        
I have a Restlet API and the methods exposed on it are called by a PHP web app. This web app is accessible by several domain names and depending on the domain certain aspects of the app are changed (look and feel, content etc).
Is there a way for Restlet to determine the URL of the calling web app? I have used getReference() but all I can get is the (internal) IP address of the calling web server (not the domain name).
My only other alternative is to pass the URL of the web app with every request to the API but it would be cleaner if Restlet already knew.
Thanks
© Stack Overflow or respective owner