In the async Javascript mode Sora will only provide the search keyword for the the searchResults function and the URL for the other three functions. Aside from that, the response format is required to be the same as normal mode.
WARNING:
Do not use .json() or .text() methods as those will not work on iOS!
For .json():
Wrong method
constdata=awaitresponse.json();
Instead use:
Correct method
constdata=awaitJSON.parse(response);
For .text():
Wrong method
constdata=awaitresponse.text();
Instead assign the value directly:
Correct method
constdata=await response;
Goes without saying that this applies to StreamAsync mode too. You shouldn't need these methods in normal mode but if you do, use the above mentioned way.
Functions:
Extracts the search results from the provided keyword.