07-19-2016, 06:17 PM
If you want an asynchronous InternetGET/POST object, you must allocate it on the heap rather than the stack, as (due to the asynchronicity) the object's lifespan must last longer than the current function call. To accomplish this, the InternetGET/POST class provides a static `Async()` method, which returns a pointer to a properly allocated InternetGET/POST object.
And be sure to call the C++ `delete` operator on `iGET` before plugin shutdown. See the docs for the `Async()` method for other notes.
Code:
hdi::core::InternetGET* iGET = hdi::core::InternetGET::Async(<your arguments>);
if(iGET)
{
iGET->run();
}
And be sure to call the C++ `delete` operator on `iGET` before plugin shutdown. See the docs for the `Async()` method for other notes.