Process the response body to make sure that its contains the list name defined on resource
 Returns the list name present on body and the body itself
353627
def add_listname_on_body(resource, body)
      body.kind_of?(Array) ? process_body_as_array(resource, body) : process_body_as_hash(resource, body)
    end
856299
def get_list(self, list_name, options=None):
        
        options = options or {}
        data = {'list': list_name}
        data.update(options)
        return self.api_get('list', data)
596090
function (methodName) {
            var response = this.getResponseSchema(methodName),
                payloadName = this.getResponsePayloadName(methodName),
                isList = false;

            if (response.type !== "null") {
                if ((payloadName && response.properties[payloadName] && response.properties[payloadName].type === "array") ||
                        (response.type && response.type === "array")) {
                    isList = true;
                }
            }

            return isList;
        }
664809
def _process(self, responses):
        
        self.log.debug("Processing search results")
        items = list()
        for response in responses:
            try:
                soup = BeautifulSoup(response.content, 'html.parser',
                                     from_encoding="iso-8859-1")
            except:
                continue
            else:
                listings = soup.findAll('li', {'class': 'b_algo'})
                items.extend([l.find('a')['href'] for l in listings])
        self.log.debug("Search result URLs were extracted")
        return items
1026502
def _process_list(self, l):
        
        if hasattr(self, l):
            t = getattr(self, l)

            def proc(inp):
                w = inp.strip()

                if w.startswith('`'):
                    r = re.compile(w[1:-1])
                    return [u for u in [m.group() for m in [r.match(x) for x in dir(self)] if m] if isinstance(getattr(self, u), QObject)]
                else:
                    return [w]

            return list(set([y for x in map(proc, t.split(',')) for y in x]))

        return []
399144
def __respond_with_list(self, data):
        
        response = []
        if isinstance(data, dict):
            data.pop('seq', None)
            data = list(data.values())

        for item in data:
            values = item
            if isinstance(item, list) or isinstance(item, dict):
                values = self.__respond_with_list(item)

            if isinstance(values, list) and len(values) == 1:
                response.extend(values)
            else:
                response.append(values)

        return response
579514
function findname(error, response, body) {
		if (error){
                        return error
                }
              	if (body){
			try{
				var info = JSON.parse(body)
			}
			catch(err){
				console.log(body)
				return
			}			
			if (info.items){
		        	var ilen=info.items.length
		        	while(ilen--){
		                	var it=info.items[ilen]
		                	var thename=it['properties']['name']
		                	if (thename.match(srchfor)){
		         			console.log(it) // <---- print json for server(s) that match srchfor
		                	}
                                }
                        }
                }
}
1252346
def List(self, name, initial=None):
        
        return types.List(name, self.api, initial=initial)
1030120
def process_request(self, request_object):
        """"""

        identifier = request_object.identifier

        # Look for the object by its ID and return it
        resource = request_object.entity_cls.get(identifier)
        return ResponseSuccess(Status.SUCCESS, resource)
1071200
def post_collection(self, collection, body):
        
        assert isinstance(body, (list)), "POST requires body to be a list"
        assert collection.startswith('/'), "Collections must start with /"
        uri = self.uri + '/v1' + collection
        return self.service._post(uri, body)
365109
def lists
      response = @@soap.getClientLists(:apiKey => @apiKey, :clientID => @clientID)
      lists = handle_response response.client_GetListsResult
      lists.collect {|list| List.new(list.listID, list.name, :apiKey=> @apiKey)}
    end
1061799
def _list(self, uri, obj_class=None, body=None, return_raw=False,
            other_keys=None):
        
        if body:
            resp, resp_body = self.api.method_post(uri, body=body)
        else:
            resp, resp_body = self.api.method_get(uri)
        if return_raw:
            return (resp, resp_body)
        if obj_class is None:
            obj_class = self.resource_class

        data = self._data_from_response(resp_body)
        ret = [obj_class(self, res, loaded=False) for res in data if res]
        if other_keys:
            keys = utils.coerce_to_list(other_keys)
            other = [self._data_from_response(resp_body, key) for key in keys]
            return (ret, other)
        else:
            return ret
872467
def get_response(self, action, params, path='/', parent=None,
                     verb='GET', list_marker='Set'):
        
        if not parent:
            parent = self
        response = self.make_request(action, params, path, verb)
        body = response.read()
        boto.log.debug(body)
        if response.status == 200:
            e = boto.jsonresponse.Element(list_marker=list_marker,
                                          pythonize_name=True)
            h = boto.jsonresponse.XmlHandler(e, parent)
            h.parse(body)
            return e
        else:
            boto.log.error('%s %s' % (response.status, response.reason))
            boto.log.error('%s' % body)
            raise self.ResponseError(response.status, response.reason, body)
1069110
private boolean hasBody(Response response) {
        int status;

        status = response.getStatusLine().code;
        if ("HEAD".equals(method)) {
            return false;
        } else {
            return status >= StatusCode.OK && status != StatusCode.NO_CONTENT && status != StatusCode.NOT_MODIFIED && status != StatusCode.RESET_CONTENT;
        }
    }
262843
def get_list(client, list_id):
    '''  '''
    endpoint = '/'.join([client.api.Endpoints.LISTS, str(list_id)])
    response = client.authenticated_request(endpoint)
    return response.json()
1097106
def list=(pl)

      list = get_list

      list['list'] = pl.collect { |e|
        ParticipantEntry.read(e)
      }.collect { |e|
        e[0] = e[0].source if e[0].is_a?(Regexp)
        e
      }

      if r = @context.storage.put(list)
        #
        # put failed, have to redo it
        #
        self.list=(pl)
      end
    end
205735
def _read_response(self, response):
        
        self.name = response['name']
        self.includesPattern = response['includesPattern']
        self.excludesPattern = response['excludesPattern']
        self._repositories = response.get('repositories', [])
        if 'principals' in response:
            if 'users' in response['principals']:
                self._users = response['principals']['users']
            if 'groups' in response['principals']:
                self._groups = response['principals']['groups']