It would be nice if we can do several http client request in an asynchrone way and the result is back in the current session for store into the database or another working process like it is possible in DOTNET.
Task := HttpClient.SendAsync(HttpRequestMsg);
/* do some stuff */
HttpResponseMsg := async Task;
Or Wtih Events
Var Client: WebClient withevents;
begin
Client.SendAsync(HttpRequestMsg);
/* Do Some Stuff */
end
local procedure Client_OnGetResponse(Response: HttpResponseMsg)
begin
// Implementation for working with the result.
end;
Comments
I think this would be an extremely useful feature. Why block the main thread when waiting for a response from a system that might be processing my request for a very long time? I feel the lack of features like this one makes BC way less efficient for serious integration scenarios.
Category: Development
Business Central Team (administrator)
Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future.
Best regards,
Business Central Team