You are not logged in.
Pages: 1
With mORMot 2.0.3383 from 2022-06-02 this source code still worked:
FRestClient: TRestHttpClient;
begin
if not (FRestClient.Request is TWinHttpApi) then Exit; //=>
TWinHttpApi(FRestClient.Request).OnUpload := DoShowUpload;
Result := (FRestClient.CallBack(mPUT, methodName, pmvDataString, return) = HTTP_SUCCESS);
But via FRestClient.Socket (THttpClientSocket) I can't get the events (OnUpload/OnProgress) I need.
How do I write this now?
With best regards
Thomas
Offline
Sorry, but I don't understand your exact concern.
Sorry for being unclear.
You have made the following changes in the Unit mormot.rest.http.client:
{.$define CLIENTUSEWININET}
// force HTTP/1.1 RESTful JSON default mORMot Client class to use WinHttp
// - e.g. to try Windows built-in proxy settings
// - but is slower and less stable in some context (e.g. useHttpAsync)
And more:
{$ifdef CLIENTUSEWININET}
/// force HTTP/1.1 RESTful JSON default mORMot Client class as WinHttp
// - for support of Windows built-in proxy settings for instance
TRestHttpClient = TRestHttpClientWinHttp;
/// HTTP/HTTPS RESTful JSON default mORMot Client class is WinHttp on Windows
TRestHttpsClient = TRestHttpClientWinHttp;
{$else}
/// HTTP/1.1 RESTful JSON default mORMot Client class uses sockets on POSIX
TRestHttpClient = TRestHttpClientSocket;
Now, unlike before, this definition is used as a standard:
TRestHttpClient = TRestHttpClientSocket;
I find this change a little unfortunate. It was a change from the previous behavior. I would expect them to be more centralized in Unit mormot.defines.inc.
With best regards
Thomas
Last edited by tbo (2022-07-06 10:21:52)
Offline
Pages: 1