In that last example, the while loop will never end, and the server will ever get a chance to process another client request.
OP: I think you simply need to set a flag in the lambda expression, and deal with toggling the LED in loop(), if the flag is set.