[OSM-dev] Help needed: Problems with DELETE (using Delphi-Indy)
hy
hy at sha-mash.de
Sun Jun 15 19:17:18 BST 2008
On Sun, June 15, 2008 17:40, Frederik Ramm wrote:
> Hi,
>
>>> I haven't a clue about Delphi but the last line seems a bit wrong, is
>>> there no "httpLink.Delete(...)"?
>> It is "freed" afterwards out of the scope of this routine.
>
> That was not what I meant. I meant that you used a "put" command to
> execute the "delete" method, whereas you had previously used "put" to
> execute "put" and "get" to execute "get".
No, matter of factly you couldn't see the stuff behind the scenes.
The HTTP-object is instantiated before calling the routine, that I posted
(and destroyed afterwards). So the actual object is kinda 'clean'.
> So I was wondering why there
> wasn't a "delete" method as well. There *are* HTTP stacks that only
> support GET/POST and sometimes HEAD but nothing more; maybe you are
> using one of them.
Yeah, I was afraid that it was like that. But nevertheless, the
Indy-component that I am using has a constant defined for
DELETE-Operations, that I used and from there I assumed that this
component should support DELETE.
> You could of course just implement DELETE yourself by using a generic
> TCP socket class, have it connect to the server and send DELETE
> /api/0.5/way/1234 HTTP/1.0 but you'd need to do the authentication bit
> yourself, i.e. send a proper authorization header (google for HTTP BASIC
> AUTH).
:-(
Actually I want to get on with my app and not get lost in hacking TCP/IP
on my own - if you understand what I mean.
> Are you implementing an editor? You said initially that you were
> extending your GPS display routines to display OSM data, why would you
> want to delete OSM data from the server?
I am doing 'mapping' since 5 years. And my experience told me that there
always is something that is wrong (because for changes in the streets or
errors due to bad signal quality) - so deleting is a part of the action.
All of my routes and WPs/nodes (more than 200.000) are checked at least 2
times or more often. I am living in a mountain area, where signal quality
is often bad. But when the GPSr states: Accuracy=12m
this might be utterly wrong due to reflections.
Nevertheless I understand your uncertainty, about a newbe suddenly showing
up and wanting to know how to DELETE stuff...
Well, actually I was testing my export routines and read the output with
JOSM - which didn't complain, but screwed up the pasted data that I was
copying from one layer to another (which one should NOT do - as I learned
now). Nevertheless I thought it was a good idea to test deleting via HTTP,
when I wanted to get these errors undone.
So for the moment I need 'delete' for testing and I am pretty sure that
there will be needs for this after testing has finished.
TNX for your answer.
--
-m*sh-
___________________________________________________
| harry w. graner
|mail: hy [_at_] sha-mash [_dot_] de
|---------------------------------------------------
[public gpg-key on request]
take a look at my blogs:
http://sha-mash.blog.de
More information about the dev
mailing list