Re: [twsocket] HTTP PATCH method for the HttpCli
Any technical reason for discarding this functionality I submitted some time ago? I'm using it with the Google Drive API, add seems to be working fine. https://developers.google.com/drive/v2/reference/files/patch Hi, Bellow I'm sending a OverbyteIcsHttpProt.pas diff file to implement the HTTP PATCH method ( https://tools.ietf.org/html/rfc5789 ) Some RESTful APIs need this method, so it's handy to have it directly implemented instead of emulating it with a PUT and later header change in the OnRequestHeaderEnd event. --- --- /trunk/Source/OverbyteIcsHttpProt.pas +++ /trunk/Source/OverbyteIcsHttpProt.pas @@ -611 +611 @@ -httpHEAD, httpDELETE, httpCLOSE); +httpHEAD, httpDELETE, httpCLOSE, httpPATCH); @@ -931,0 +932 @@ +procedure Patch; { Synchronous blocking Patch } @@ -938,0 +940 @@ +procedure PatchAsync; { Asynchronous, non-blocking Patch } @@ -2329,0 +2332,18 @@ +httpPATCH: +begin +SendRequest('PATCH', FRequestVer); +{$IFDEF UseNTLMAuthentication} +if not ((FAuthNTLMState = ntlmMsg1) or +(FProxyAuthNTLMState = ntlmMsg1)) then begin +TriggerSendBegin; +FAllowedToSend := TRUE; +FDelaySetReady := FALSE; { 09/26/08 ML } +SocketDataSent(FCtrlSocket, 0); +end; +{$ELSE} +TriggerSendBegin; +FAllowedToSend := TRUE; +FDelaySetReady := FALSE; { 09/26/08 ML } +SocketDataSent(FCtrlSocket, 0); +{$ENDIF} +end; @@ -2423 +2443 @@ -if ((FRequestType = httpPOST) or (FRequestType = httpPUT)) and +if (FRequestType in [httpPOST, httpPUT, httpPATCH]) and @@ -2442 +2462 @@ -if (FRequestType = httpPOST) or (FRequestType = httpPUT) then begin +if FRequestType in [httpPOST, httpPUT, httpPATCH] then begin @@ -3009 +3029 @@ -if FRequestType = httpPUT then begin +if FRequestType in [httpPUT, httpPATCH] then begin @@ -3273 +3293 @@ -if ((Rq = httpPOST) or (Rq = httpPUT)) and +if (Rq in [httpPOST, httpPUT, httpPATCH]) and @@ -3277 +3297 @@ -raise EHttpException.Create('HTTP component has nothing to post or put', +raise EHttpException.Create('HTTP component has nothing to post, put or patch', @@ -4499,0 +4520,17 @@ +httpPATCH: +begin +SendRequest('PATCH', FRequestVer); +{$IFDEF UseNTLMAuthentication} +if not ((FAuthNTLMState = ntlmMsg1) or (FProxyAuthNTLMState = ntlmMsg1)) then begin +TriggerSendBegin; +FAllowedToSend := TRUE; +FDelaySetReady := FALSE; { 09/26/08 ML } +SocketDataSent(FCtrlSocket, 0); +end; +{$ELSE} +TriggerSendBegin; +FAllowedToSend := TRUE; +FDelaySetReady := FALSE; { 09/26/08 ML } +SocketDataSent(FCtrlSocket, 0); +{$ENDIF} +end; @@ -4594,0 +4632,8 @@ +{ This will start the Patch process and wait until terminated (blocking) } +procedure THttpCli.Patch; +begin +FLocationChangeCurCount := 0 ; { V1.90 } +DoRequestSync(httpPatch); +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} @@ -4645,0 +4691,7 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will start the patch process and returns immediately (non blocking)} +procedure THttpCli.PatchAsync; +begin +FLocationChangeCurCount := 0 ; { V1.90 } +DoRequestASync(httpPatch); +end; -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] ICS updated for Delphi XE6
Any comments about XE6? Is the world a better place because it's been released? If so why? John Dammeyer > -Original Message- > From: TWSocket [mailto:twsocket-boun...@lists.elists.org] On Behalf Of > François Piette > Sent: April-17-14 10:54 AM > To: 'ICS support mailing' > Subject: [twsocket] ICS updated for Delphi XE6 > > Hi everyone ! > > > > ICS-V8 has been updated for Delphi XE6. > > No new feature, simple update for Delphi XE6 (VCL and FMX). > > Download as usual. > > > > -- > > François Piette > > > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] ICS updated for Delphi XE6
Hi François Piette Thank you very much. Best regards Michael Am 17.04.2014 19:54, schrieb François Piette: Hi everyone ! ICS-V8 has been updated for Delphi XE6. No new feature, simple update for Delphi XE6 (VCL and FMX). Download as usual. -- François Piette -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] ICS updated for Delphi XE6
Hi everyone ! ICS-V8 has been updated for Delphi XE6. No new feature, simple update for Delphi XE6 (VCL and FMX). Download as usual. -- François Piette -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Problem when using TPing with TSslWSockServer
> in unit of OverbyteIcsIcmp, > the TICMP.Destroy have some problem Thanks, now fixed in V8 and SVN will be updated overnight. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Problem when using TPing with TSslWSockServer
in unit of OverbyteIcsIcmp, the TICMP.Destroy have some problem destructor TICMP.Destroy; begin if hICMP <> INVALID_HANDLE_VALUE then IcmpCloseHandle(hICMP); if hICMP6 <> INVALID_HANDLE_VALUE then{ V8.02 } IcmpCloseHandle(hICMP6); if hICMPdll <> 0 then FreeLibrary(hICMPdll); hICMPdll := 0; WSACleanup;//this call will Influence other unit which also calle WSACleanup when TICMP.Initialize not executed. inherited Destroy; end; And this should be fine destructor TICMP.Destroy; begin if hICMP <> INVALID_HANDLE_VALUE then IcmpCloseHandle(hICMP); if hICMP6 <> INVALID_HANDLE_VALUE then{ V8.02 } IcmpCloseHandle(hICMP6); if hICMPdll <> 0 then begin FreeLibrary(hICMPdll); WSACleanup; //hICMPdll <> 0 means the TICMP.Initialize has eexecuted. end; hICMPdll := 0; inherited Destroy; end; -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be