code: def _add_post_data(self, request: Request):
          '''Add data to the payload.'''
          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(dataf _add_post_data(self, request: Request):
          '''Add data to the payload.'''
          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)
docs: Add data to the payload.