How can I call an async function with callback from within the route callback and still be able to return a HttpResponse
like so:
let server = HttpServer()
server["/redirect"] = { request in
callFunctionWithCallback { _ in
//How do I return the HttpResponse from within the callback?
}
}
How can I call an async function with callback from within the route callback and still be able to return a HttpResponse
like so: