handle_response function

Handle HTTP response from Server