Add data to the payload.
327298
def _add_post_data(self, request: Request):
        ''''''
        if self._item_session.url_record.post_data:
            data = wpull.string.to_bytes(self._item_session.url_record.post_data)
        else:
            data = wpull.string.to_bytes(
                self._processor.fetch_params.post_data
            )

        request.method = 'POST'
        request.fields['Content-Type'] = 'application/x-www-form-urlencoded'
        request.fields['Content-Length'] = str(len(data))

        _logger.debug('Posting with data {0}.', data)

        if not request.body:
            request.body = Body(io.BytesIO())

        with wpull.util.reset_file_offset(request.body):
            request.body.write(data)
68419
def add_response(self, data):
        
        assert len(data) == self._size_bytes
        result = []
        for i in range(0, self._size_bytes, 4):
            word = ((data[0 + i] << 0) | (data[1 + i] << 8) |
                    (data[2 + i] << 16) | (data[3 + i] << 24))
            result.append(word)
        self._result = result
942993
def feed_data(self, data):
        """"""
        if data:
            self._bytes.append(data)
            if self.parser.stream:
                self.parser.stream(self)
            else:
                self.parser.buffer.extend(data)
1053532
public void addData(String key, String value) throws InvalidPackageRevisionDataException {
        validateDataKey(key);
        data.put(key, value);
    }
689952
def _add_payload_files(zip_file, payload_info_list):
    """"""
    payload_byte_count = 0
    payload_file_count = 0
    for payload_info_dict in payload_info_list:
        zip_file.write_iter(payload_info_dict['path'], payload_info_dict['iter'])
        payload_byte_count += payload_info_dict['iter'].size
        payload_file_count += 1
    return payload_byte_count, payload_file_count
1224818
def make_create_payload(**kwargs):
    """"""
    payload = {}
    # Add non-empty arguments
    for k, v in six.iteritems(kwargs):
        if v is not None:
            payload[k] = v

    return payload
1139055
def insertData(self, offset: int, string: str) -> None:
        """"""
        self._insert_data(offset, string)
1278099
def add(self, data):
		
		if len(self) + len(data) > self.sizelimit:
			raise OmapiSizeLimitError()
		self.buff.write(data)
		return self
73533
def put(self):
        """"""
        cred_payload = utils.uni_to_str(json.loads(request.get_data()))
        return self.manager.update_credential(cred_payload)
664882
public void addPayload(IoBuffer additionalPayload) {
        if (payload == null) {
            payload = IoBuffer.allocate(additionalPayload.remaining());
            payload.setAutoExpand(true);
        }
        this.payload.put(additionalPayload);
    }
1104984
def write (self, data):
        """"""
        self.tmpbuf.append(data)
        self.pos += len(data)
367991
def add_message_to_queue(self, payload, **attributes):
        

        return self.queue.send_message(MessageBody=json.dumps(payload),
                                       MessageAttributes={k: {"StringValue": v} for k, v in attributes.items()})
596514
public void addPayloadType(final PayloadType pt) {
        synchronized (payloads) {
            if (pt == null) {
                LOGGER.severe("Null payload type");
            } else {
                payloads.add(pt);
            }
        }
    }
695901
final void addData(final AbstractMeter meter, final double data) {
        checkIfMeterExists(meter);
        meterResults.get(meter).add(data);
    }
36863
def add(self, key, value):
        """"""
        if key not in self.headers:
            self.headers[key] = []
        self.headers[key].append(value)

        if self.sent_time:
            self.modified_since_sent = True
925288
def append_payload(self, payload: Payload) -> Payload:
        """"""
        # compression
        encoding = payload.headers.get(CONTENT_ENCODING, '').lower()  # type: Optional[str]  # noqa
        if encoding and encoding not in ('deflate', 'gzip', 'identity'):
            raise RuntimeError('unknown content encoding: {}'.format(encoding))
        if encoding == 'identity':
            encoding = None

        # te encoding
        te_encoding = payload.headers.get(
            CONTENT_TRANSFER_ENCODING, '').lower()  # type: Optional[str]  # noqa
        if te_encoding not in ('', 'base64', 'quoted-printable', 'binary'):
            raise RuntimeError('unknown content transfer encoding: {}'
                               ''.format(te_encoding))
        if te_encoding == 'binary':
            te_encoding = None

        # size
        size = payload.size
        if size is not None and not (encoding or te_encoding):
            payload.headers[CONTENT_LENGTH] = str(size)

        self._parts.append((payload, encoding, te_encoding))  # type: ignore
        return payload
955977
def add_data_dict(self, datadict):
        '''
        '''

        self.set_codes(list(datadict.keys()))
        self.add_data(list(datadict.values()))