def render_GET(self, request):
        """ This method is called by the twisted framework when a GET request
            was received.
        """
        # First check if the version is ok
        try:
            version = request.args['version']
        except __HOLE__:
            request.setResponseCode(httpstatus.HTTP_STATUS_CODE_BAD_REQUEST[0])
            request.setHeader('content-type', 'text/plain; charset=utf-8')
            return "Request is missing parameter: 'version'"

        if len(version) != 1:
            request.setResponseCode(httpstatus.HTTP_STATUS_CODE_BAD_REQUEST[0])
            request.setHeader('content-type', 'text/plain; charset=utf-8')
            return "Parameter 'version' has to be unique in request."

        version = version[0]

        if version < MINIMAL_VERSION:
            request.setResponseCode(httpstatus.HTTP_STATUS_CODE_GONE[0])
            request.setHeader('content-type', 'text/plain; charset=utf-8')
            return ('Client version is insufficient. Minimal version is '
                    "'{0}'.".format(MINIMAL_VERSION))
        elif version > CURRENT_VERSION:
            request.setResponseCode(httpstatus.HTTP_STATUS_CODE_NOT_IMPLEMENTED[0])
            request.setHeader('content-type', 'text/plain; charset=utf-8')
            return 'Client version is newer than version supported by server.'

        # Version is ok, now the GET request can be processed
        # Extract and check the arguments
        try:
            userID = request.args['userID']
        except KeyError:
            request.setResponseCode(httpstatus.HTTP_STATUS_CODE_BAD_REQUEST[0])
            request.setHeader('content-type', 'text/plain; charset=utf-8')
            return "Request is missing parameter: 'userID'"

        if len(userID) != 1:
            request.setResponseCode(httpstatus.HTTP_STATUS_CODE_BAD_REQUEST[0])
            request.setHeader('content-type', 'text/plain; charset=utf-8')
            return "Parameter 'userID' has to be unique in request."

        userID = userID[0]

        # Get the URL of a Robot process
        d = self._realm.requestURL(userID)
        d.addCallback(self._build_response, version, request)
        d.addErrback(self._handle_error, request)

        return NOT_DONE_YET
dataset/ETHPy150Open rapyuta/rce/rce-comm/rce/comm/server.py/RobotResource.render_GET