I've now temporarily fixed the error.
I've modified the SendRequestAsync function in XData.Web.Connection.pas as follows:
//function TXDataWebConnection.SendRequestAsync( Request: IHttpRequest): IHttpResponse;
function TXDataWebConnection.SendRequestAsync( Request: IHttpRequest): TJSPromise;
//var
// Promise: TJSPromise;
begin
//Promise := TJSPromise.new(
Result := TJSPromise.new(
procedure(resolve, reject: TJSPromiseResolver)
begin
SendRequest(
Request,
procedure(Response: IHttpResponse)
begin
if Assigned(Response) then
Response._AddRef;
//resolve(Response);
resolve(JSValue(Response));
end,
procedure
begin
reject(Exception.Create('Request error: ' + Request.Uri));
end
);
end
);
//Exit(Promise);
end;
Due to the stricter validation, the function now returns a TJSPromise (internally as a JSValue).
I had to replace my call
Response := TAwait.Exec<IHttpResponse>( Conn.SendRequestAsync( THttpRequest.Create( myFile)));
// Wrong number of parameters specified for call to "function await(aType,TJSPromise):aType
with this one
Response := await( IHttpResponse, Conn.SendRequestAsync( THttpRequest.Create( myFile)));
So it works again.
I hope this was helpful and I look forward to an update ![]()