Use the right event loop to write the HTTP response.

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>