Execute_async examples

Hi there. I am a bit stuck with the Web contect and appium. I have a Hybrid mobile app. When I reach the Webview I am able to connect to it with Safari (develop menu ->selecting mydevice )and execute a simple async javascript command: await mymethod(). This gives back the result that I need.

I want to get the same result with Appium, but I am running into trouble. Appium’s execute (http://appium.io/docs/en/commands/web/execute/) seems to fail if I use await. I realized that I may need to use the execut_async (http://appium.io/docs/en/commands/web/execute-async/) to be able to call this, but unfortunately the examples and the documentation is not too verbose.

I am using Postman to send the POST requests to the endpoint like this (to my best knowledge) :
POST http://localhost:4723/wd/hub/session/917b89ce-a67c-4a88-8b2c-4823f725757f/execute_async
{“script”:“mymethod()”,“args”:["function a() { alert(testalert)} "]}

I am not sure if I am passing the callback method correctly, but it is not called. (there is no alert on the screen)

can someone help or provide useful documentation pls.