:type response_raw: client.BunqResponseRaw

        :rtype: client.BunqResponse[str]
178086
def _process_for_uuid(cls, response_raw):
        

        json = response_raw.body_bytes.decode()
        obj = converter.json_to_class(dict, json)
        uuid = converter.deserialize(
            Uuid,
            cls._unwrap_response_single(obj, cls._FIELD_UUID)
        )

        return client.BunqResponse(uuid.uuid, response_raw.headers)
568418
def fetch_response(self, req_payload, **kwargs):
        
        if req_payload.uuid:
            uuids = set([req_payload.uuid, "CONNECT"])
            def callback(res_payload):
                #pout.v(req_payload, res_payload)
                #ret = req_payload.uuid == res_payload.uuid or res_payload.uuid == "CONNECT"
                ret = res_payload.uuid in uuids
                if ret:
                    logger.debug('{} received {} response for {}'.format(
                        self.client_id,
                        res_payload.code,
                        res_payload.uuid,
                    ))
                return ret

            res_payload = self.recv_callback(callback, **kwargs)

        return res_payload
261042
def _from_json_list(cls, response_raw, wrapper=None):
        

        json = response_raw.body_bytes.decode()
        obj = converter.json_to_class(dict, json)
        array = obj[cls._FIELD_RESPONSE]
        array_deserialized = []

        for item in array:
            item_unwrapped = item if wrapper is None else item[wrapper]
            item_deserialized = converter.deserialize(cls, item_unwrapped)
            array_deserialized.append(item_deserialized)

        pagination = converter.deserialize(client.Pagination,
                                           obj[cls._FIELD_PAGINATION])

        return client.BunqResponse(array_deserialized, response_raw.headers,
                                   pagination)
1183929
def get_response(self):
        
        res = IODWriteMultipleRes()
        for field in ["seqNum", "ARUUID", "API", "slotNumber",
                      "subslotNumber", "index"]:
            res.setfieldval(field, self.getfieldval(field))

        # append all block response
        res_blocks = []
        for block in self.getfieldval("blocks"):
            res_blocks.append(block.get_response())
        res.setfieldval("blocks", res_blocks)
        return res
1310174
def parse_response(self, response):
        
        parser, unmarshaller = self.getparser()
        parser.feed(response.text.encode('utf-8'))
        parser.close()
        return unmarshaller.close()
515312
def get_response(self, results):
        
        if results is None:
            return None
        for result in itertools.chain.from_iterable(results):
            if isinstance(result, BaseResponse):
                return result
1015309
def _get_response(**kwargs):
    
    if 'code' not in kwargs:
        kwargs['code'] = 200
    if 'headers' not in kwargs:
        kwargs['headers'] = dict()
    if 'version' not in kwargs:
        kwargs['version'] = 'HTTP/1.1'

    return dict(**kwargs)
954612
def raw_response(json, status)
      json.empty? ? {} : JSON.parse(json, symbolize_names: true)
    rescue StandardError
      { message: json, code: status }
    end
827182
async def get_data(self, raw: bool=True) -> AnyStr:
        """"""
        if self.implicit_sequence_conversion:
            self.response = self.data_body_class(await self.response.convert_to_sequence())
        result = b'' if raw else ''
        async with self.response as body:  # type: ignore
            async for data in body:
                if raw:
                    result += data
                else:
                    result += data.decode(self.charset)
        return result
60844
def build_response(
            self,
            status=NOT_SET,
            error="",
            data=None):
        

        res_node = {
            "status": status,
            "error": error,
            "data": data
        }
        return res_node
284567
def wrapped_resource(response):
    
    # decode response text, assuming utf-8 if unset
    response_content = response.content.decode(response.encoding or 'utf-8')

    try:
        content = json.loads(response_content)
    except ValueError:
        # not JSON
        content = response_content
    if isinstance(content, list):
        result = ResourceList(content)
    else:
        result = Resource(content)
        if hasattr(result, 'collection'):
            result.collection = ResourceList(result.collection)
    result.raw_data = response_content

    for attr in ('encoding', 'url', 'status_code', 'reason'):
        setattr(result, attr, getattr(response, attr))

    return result
10340
def parse_requests_response(response, **kwargs):
    

    return parse_headers(
        response.headers.get('content-disposition'), response.url, **kwargs)
1081806
def raw(self, from_, to, body):
        
        if isinstance(to, string_types):
            raise TypeError('"to" parameter must be enumerable')
        return self._session.post('{}/raw'.format(self._url), json={
            'from': from_,
            'to': to,
            'body': body,
        }).json()
1255261
def _handle_response(response, **kwargs) -> XMLResponse:
        
        if not response.encoding:
            response.encoding = DEFAULT_ENCODING

        return response
351423
def get_raw_data(self):
        
        arguments = self.request.argv[1:]
        if not arguments[0].startswith('--'):
            # first argument is the program name
            arguments = arguments[1:]
        return parse_kwargs(arguments)
401037
def decode_response(client_message, to_object=None):
    
    parameters = dict(response=None)
    response_size = client_message.read_int()
    response = []
    for _ in range(0, response_size):
        response_item = client_message.read_data()
        response.append(response_item)
    parameters['response'] = ImmutableLazyDataList(response, to_object)
    return parameters
394011
def decode_response(client_message, to_object=None):
    
    parameters = dict(base=None, increment=None, batch_size=None)
    parameters['base'] = client_message.read_long()
    parameters['increment'] = client_message.read_long()
    parameters['batch_size'] = client_message.read_int()
    return parameters