[OSM-dev] Help needed: Problems with DELETE (using Delphi-Indy)
hy
hy at sha-mash.de
Sun Jun 15 16:43:30 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I've written an App some 5 years ago that handles GPS-Data (editing,
Import from GPS-Device, export, import ...) and displays the Data as a
map very similar (but with other concepts) as JOSM.
After I have learned of OSM last week I wrote some conversion routines
and extended my modules to be able to handle OSM-Data as well.
At the moment I can upload (PUT) and download (GET) data to and from OSM
to my Application. But it fails when I want to delete an item on the Server.
I am (currently) using Delphi 2006 with Indy 10.1
- ---------------------code-------------------
x:=tFileStream.create(_sFile,fmOpenRead);
try
httpLink.Request.BasicAuthentication:=true;
httpLink.Request.Password:=ePassword.Text;
httpLink.Request.Username:=eUsername.Text;
Moutput.Lines.Clear; //a Memo that displays returned results
case rgMethod.ItemIndex of //what did user chose
0:begin
httpLink.request.Method:=Id_HTTPMethodPut;
Moutput.Lines.Text:=httpLink.Put(eURL.text,x);
end;
1:begin
httpLink.request.Method:=Id_HTTPMethodGet;
Moutput.Lines.Text:=httpLink.Get(eURL.text);
end;
2:begin
s:='http://api.openstreetmap.org/api/0.5/node/'+IntToStr(nodeid);
httpLink.Request.Method:=Id_HTTPMethodDelete;
s:=httpLink.Put(s,x);
moutput.Lines.Add(s);
end;
end;//esac
finally
httpLink.Disconnect;
xr.Free;
x.free;
xDummy.free;
end;
- --------------------------cut------------------------------------
Any help is appreciated.
- --
- -m*sh-
___________________________________________________
| harry w. graner
|mail: hy [_at_] sha-mash [_dot_] de
|---------------------------------------------------
[public gpg-key on request]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIVPnM+62Q1j2JM1YRAkIvAJ95AEPdCft0WmuRUg1TOu2hW7vkwwCgn1nD
r4rAU0m0uBhmINZ582rk2TQ=
=hT3g
-----END PGP SIGNATURE-----
More information about the dev
mailing list