[OSM-dev] PUT /api/0.6/{node|way|relation}/{id|create}
Dave Stubbs
osm.list at randomjunk.co.uk
Mon Jun 9 20:22:03 BST 2008
On Mon, Jun 9, 2008 at 6:47 PM, Stefan de Konink <skinkie at xs4all.nl> wrote:
> Dave Stubbs schreef:
>>
>> I think it has been solved: just implement the API the way it is.
>
> That is the actual question. Why does the api require a {node|way|relation}
> if the actual XML, first child, already gives this information?
Because it lets you easily route the request to the relevant piece of
server code without having to parse the (potentially large) payload
first.
ie: http://trac.openstreetmap.org/browser/sites/rails_port/config/routes.rb
which dispatches the API commands to the relevant rails controller and
action to handle the request.
It is of course possible to do it without that. YMMV on whether this
gains or loses much, but it changes the API quite a lot in the process
which is probably a bad thing without a clear cut gain.
Dave
More information about the dev
mailing list