def gather_parameters(self, request, response, api_version=None, **input_parameters):
        input_parameters.update(request.params)
        if self.parse_body and request.content_length is not None:
            body = request.stream
            content_type, encoding = separate_encoding(request.content_type)
            body_formatter = body and self.api.http.input_format(content_type)
            if body_formatter:
                body = body_formatter(body, encoding) if encoding is not None else body_formatter(body)
            if 'body' in self.parameters:
                input_parameters['body'] = body
            if isinstance(body, dict):
                input_parameters.update(body)
        elif 'body' in self.parameters:
            input_parameters['body'] = None

        if 'request' in self.parameters:
            input_parameters['request'] = request
        if 'response' in self.parameters:
            input_parameters['response'] = response
        if 'api_version' in self.parameters:
            input_parameters['api_version'] = api_version
        for parameter, directive in self.directives.items():
            arguments = (self.defaults[parameter], ) if parameter in self.defaults else ()
            input_parameters[parameter] = directive(*arguments, response=response, request=request,
                                                    api=self.api, api_version=api_version, interface=self)

        return input_parameters
Run a command that interacts with an unreliable network.
dataset/ETHPy150Open timothycrosley/hug/hug/interface.py/HTTP.gather_parameters--crossover with--dataset/ETHPy150Open ClusterHQ/flocker/flocker/provision/_ssh/_model.py/run_network_interacting_from_args