Create a component with a TJSPromise

Hi,

I would like to create a custom component for Web Core, but one thing I don't understand is how to create an async/await method.

I looked at the source code of TwebHTTPRequest.Perform, but in the sourcecode I only saw:

function TWebHttpRequest.Perform: TJSPromise;
begin
  Result := nil;
end;

Thank you

You would need to decorate the call from where you use the Perform method with the [async] attribute.

This is also explained here: