REST doesn't work with Sever-Client-Client setup
        Posted  
        
            by drozzy
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by drozzy
        
        
        
        Published on 2010-05-03T19:56:50Z
        Indexed on 
            2010/05/03
            19:58 UTC
        
        
        Read the original article
        Hit count: 409
        
I am having a problem with my current RESTful api design.
What I have is a REST api which is consumed by Django web-server, which renders the HTML templates.
    REST api 
        > Django webserver
                 > HTML
The problem I am encountering is that I have to reconstruct all the URLS like
mysite.com/main/cities/<id>/streets/
into equivalent rest api urls on my web-server layer:
api.com/cities/<id>/streets/
Thus I have a lot of mapping back and forth, but as far as I know REST says that the client (in this case my web-server) should NOT need to know how to re-construct the urls.
Can REST be used for such a setup and how? Or is it only viable for Server-Client architecture.
Thanks
© Stack Overflow or respective owner