我需要删除一个事件,我所做的是将事件的 ID 保存在数据库中,然后使用该 url thttpid.delete 删除它,但我收到错误 402 禁止
Code= 'XXXXxxXXXxx' // ClientLogin code
URL:='https://www.google.com/calendar/feeds/XXXX%40gmail.com/private/full/XXXXo8aqjok24794auifouXXXX' // ID GOOGLE EVENT
function TForm4.DeleteGoogle(Code,URL:String): String;
begin
idHTTP2.IOHandler:=IdSSLIOHandlerSocketOpenSSL1;
idHTTP2.Request.Connection := 'Keep-Alive';
idHTTP2.Request.ContentType := 'application/atom+xml';
idHTTP2.Request.CustomHeaders.Values['GData-Version']:='2.0';
idHTTP2.Request.CustomHeaders.Values['Authorization']:=('GoogleLogin Auth='+Code);
try
idHTTP2.Delete(URL);
except on E: EIdHTTPProtocolException do
idHTTP2.Delete(URL);
end;
//ID
Result:=(IdHTTP2.Response.Location);
end;
我需要删除此事件的 url 是什么?