Update writer.py

Read the response to allow the reuse of the connection