So in my plugin I need to make an HTTP call (yes I absolutely must). When I submitted the plugin for review it was rejected because I do the HTTP call in the main thread. What is the best way to do an HTTP call outside the main thread?
Use async task like mine: https://github.com/ThunderDoesPlugins/Twix/blob/master/src/Thunder33345/Twix/TwixFetcher.php Most of the code there are just for API support just try to curl exec under OnRun but keep in mind using threads have limitations, like dont pass $server or $plugin etc also calling things like set_time_limit() are not recommended and PMMP already called that + plugins will not be terminated by function running too long offtopic, your plugin should try to make things into function calls then nesting in onCommand, that make it more readable and API support, if you plan to have any