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?
Ease of use is driving my faithless thoughts.
If a user knows some location how can she transmit the information
without special tools?
On mobile phones, on a notebook or a PC everybody has a web-browser
so she just types the lat/lon into the URL, hits enter and the data
is uploaded with minimal data transmission costs.
Using POST (to be REST philosophy conforming) complicates the case.
You need a special command line client like 'curl' to get it right.
Or a HTML page to enter the data (is not easy to script for many lat/lon
to upload).
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)
I find it difficult to model a hierarchy which 'burns in' my current
view of a topic.
Is it
/serv/joe/location/47.111,9.432
or
/serv/location/holidayFrance/47.111,9.432
and the credentials (loginname/password) is telling me that it is
somehow related to joe.
'holidayFrance' would be the track name, and yes, it should be
a POST.
Or even
/serv/location/holidayFrance/joe/47.111,9.432
/serv/location/joe/holidayFrance/47.111,9.432
but what if joe had his wife 'petty' along? The name does not
make sense any more and breaks the above hierarchy to
/serv/location/joe,petty/holidayFrance/47.111,9.432
Why should I be pressed to model a hierarchy if I feel
uncomfortable with all approaches, so I end up:
/serv/location/47.111,9.432?trackName=holidayFrance&participants=joe,petty,jack&height=520m
(jack is their little baby they had along).
But now, another holiday group may choose to use the trackName 'holidayFrance'
and by incident are travelling over the exactly same point '47.111,9.432' -
so how to distinguish? The URL path is not unique enough!
Ok, by the login credentials transferred somewhere else.
But if joe goes to the same place every year again, i need to
convince him to name the track 'holidayFrance2007', 'holidayFrance2008' ...
Oi, oi, very confusing for my diluted brain ...
And another question:
What existing command line clients do you use to make GET/POST/PUT/DELETE calls?
Curl is typically preinstalled on Linux (with ssl support),
but what is a command line client pre-installed on a Windows box?
thanks
Marcel