[OSM-dev] Forget my last post ...
hy-soft
hy-soft at sha-mash.de
Fri Dec 18 23:27:49 GMT 2009
Shaun McDonald wrote:
> Would it be possible if you could please post the answer so that if someone else comes across the problem the solution is documented?
If you have any idea as to where I could usefully post (wiki??)
sourcecode for pascal-programmers, just let me know.
-------------------------------cut-------------------------------
-----------------------------yIdHttpExt.pas----------------------
{
Pascal Users / Users of Indy-Library may use this descendant instead of
a TidHTTP-Object
in order to communicate with openstreetmap-servers/api
}
unit yIdHttpExt;
interface
uses
IdHTTP,classes,sysutils,
IdHeaderList;
type
yIdHTTP = class(TIdHTTP)
private
published
public
function DoYDelete(AURL:
string;strRequest,strAnswer:tFileStream):string;
end;
implementation
function yIdHTTP.DoYDelete(AURL:
string;strRequest,strAnswer:tFileStream):string;
begin
ProtocolVersion := pv1_1;
httpOptions := httpOptions + [hoKeepOrigProtocol];
try
result := '';
request.CustomHeaders.add('X_HTTP_METHOD_OVERRIDE: DELETE');
self.DoRequest(Id_HTTPMethodPost,AURL,strRequest,NIL,[]);
result := self.Responsetext;
except
on e:exception do
result := e.message;
end;
end;
end.
More information about the dev
mailing list