My current implementation sends a POST request after every log event (i.e.
The request takes some time to finish, therefoe, I’d like to run these requests as a background task.
Currently, I use the following approach
Threads.@spawn begin HTTP.request("POST", url, header, event) end
which spawns a new task without waiting for the result. Performance-wise this works quite well, but it is hacky since I don’t wait for a potential error message if the POST request fails.
Is it possible to run this post request as a proper background task without blocking the execution of the other code but still receiving the return value of the request?