scenario for GET or POST in REST

I have read some if not all of Steve's excellent blog posts on REST architectures.

I have one question that came to me this morning...

Say I make a search query, passing a "surname" and on or more location names. I make this a GET method as i am simply reading data. But the idea is that if any of the locations do not exist, i need to add that location to the database, get some key for it and then include this new key as part of the search.

Is it still OK to make this a GET, as clearly the internal state of the request is changing? Making it a POST makes it more awkward for bookmarking etc however.

I know I can technically make it a GET as it is me writing the service... but is this the right approach... is it about give and take when it comes to these kind of things? I ask as i know you folks have been doing quite a lot of work on GET/POST/PUT/DELETE etc..

steven

http://livz.org

[1013 byte] By [weblivz] at [2008-1-8]
# 1

That is an interesting design questions...

I have not done too much with the REST-based approach until now, but have found some good resources discussing this:

http://tssblog.techtarget.com/index.php/interoperability/mini-guide-rest-representational-state-transfer/

ChristianWeyer at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 2
Thanks for the pointer... i suspect the answer to this one could be more political than technical Smile

It's just a real life scenario for me.... but with POST looking broken in Orcas 2 i don't have many options anyway.

regards,
steven
http://livz.org

weblivz at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...

Visual Studio Orcas

Site Classified