Clear the buffer before sending the request if necessary
When interrupting a request (by pressing Ctrl+C for instance),
there might be some unread data that needs to be cleared before
sending a new request.