Hi Marcel I'd highly recommend ready Richardson's 'RESTful web services' if you're getting into REST. It is the key text and deals clearly with your questions. In fact, one of the key examples deals with geocord services.
http://www.amazon.com/Restful-Web-Services-Leonard-Richardson/dp/0596529260?ie=UTF8&s=books&qid=1173381194&sr=8-1 Marcel wrote: > > Is it conforming to the REST philosophy to use key/values in the URL? > > http://www.x.com/serv/location?user=joe&passwd=bla&lat=4.132&lon=8.4559 > The key principle here is to put information into the URI (as opposed to HTTP headers). This allows users to bookmark the URI and to pass it around. Your proposed URI does this and so is RESTful in that sense. However, here are some rules of thumb: 1. Use query parameters (key/values in URL) when the resources behaves like an algorithm - for example, a search for users by name might well be accessed by a URL such as http://.../users?name=joe 2. / indicates a hierarchical relationship - for example, http://.../users/joe/location suggests that 'location' is a property of 'joe' who is a 'user' > and further, how can I force a POST when i copy/paste the above > into my Firefox url field? You cant, as far as I know. Forms are the way to POST from a browser. Why would you want to do this? > > As the above does an upload of lat/lon it should be a POST, shouldn't it? > Actually you probably want PUT. Think of POST as 'append' and PUT as 'overwrite'. Suppose your service tracks Joe's current location (a single resource), but also stores an infinite number of past locations. You'd might do this: POST http://.../joe/locations/previous - each post appends another location, creating resources such as http://.../joes/locations/previous/1, http://.../joes/locations/previous/2, etc. PUT http://.../joe/locations/current - sets Joe's current location, overwriting the last know location - no new resource is created (in an actual system this would probably create a new previous location automatically, so it's not a perfect example) Looks like your other questions have been answered while I was writing this. Hope that helps Richard

