Build the payload
493362
def _payload_builder(self, query, format=None):
        ''''''
        if self.community :
            query = self.COMMUNITY_DATA + query # access to community data tables

        if vars(self).get('yql_table_url') : # Attribute only defined when MYQL.use has been called before
            query = "use '{0}' as {1}; ".format(self.yql_table_url, self.yql_table_name) + query

        if vars(self).get('_func'): # if post query function filters
            query = '| '.join((query, self._func))

        self._query = query        
        
        self._query = self._add_limit()
        self._query = self._add_offset()

        logger.info("QUERY = %s" %(self._query,))

        payload = {
            'q': self._query,
            'callback': '',#This is not javascript
            'diagnostics': self.diagnostics,
            'format': format if format else self.format,
            'debug': self.debug,
            'jsonCompact': 'new' if self.jsonCompact else ''
        }

        if vars(self).get('_vars'):
            payload.update(self._vars)

        if self.crossProduct:
            payload['crossProduct'] = 'optimized'

        self._payload = payload
        logger.info("PAYLOAD = %s " %(payload, ))

        return payload
797778
def build_frame(command, payload):
        """"""
        packet_length = 2 + len(payload) + 1
        ret = struct.pack("BB", 0, packet_length)
        ret += struct.pack(">H", command.value)
        ret += payload
        ret += struct.pack("B", calc_crc(ret))
        return ret
1296930
function buildPayload(&$payload)
    {
        if (is_array($payload)) {
            $payload = $this->array_map_deep($payload, array($this, 'buildPayloadItemInfo'));
        } else {
            $payload = $this->makePayloadBuilder($payload);
            $this->buildPayload($payload);
        }

        return $payload;
    }
1082362
def run_payload(self, payload, *, flavour: ModuleType):
        """"""
        return self.runners[flavour].run_payload(payload)
1143391
function TriggerRequestPayload(payload) {
  TriggerRequestPayload.super_.call(this, payload);

  this.payload = _.defaults(this.payload || {}, {
    limit: 50
  });
}
677288
def from_payload(self, payload):
        """"""
        self.major_version = payload[0] * 256 + payload[1]
        self.minor_version = payload[2] * 256 + payload[3]
1188933
def add_payload(self, payload):
        
        if self.payloads:
            self.payloads[-1].next_payload = payload._type
        self.payloads.append(payload)
568646
def push(self):
        ''''''
        message = self.build_message()
        return requests.post(self.hook, json=message)
451162
def create_payload(self):
        
        payload = super(Subnet, self).create_payload()
        if 'from_' in payload:
            payload['from'] = payload.pop('from_')
        return {u'subnet': payload}
874150
def create_payload(self):
        
        payload = super(DiscoveryRule, self).create_payload()
        if 'search_' in payload:
            payload['search'] = payload.pop('search_')
        return {u'discovery_rule': payload}
222648
def build_payload_from_queued_messages(
            self,
            use_queue,
            shutdown_event):
        
        not_done = True
        while not_done:

            if self.is_shutting_down(
                    shutdown_event=shutdown_event):
                self.debug_log(
                    'build_payload shutting down')
                return True

            self.debug_log('reading from queue={}'.format(
                str(use_queue)))
            try:
                msg = use_queue.get(
                    block=True,
                    timeout=self.sleep_interval)
                self.log_payload = self.log_payload + msg
                if self.debug:
                    self.debug_log('got queued message={}'.format(
                        msg))
                not_done = not self.queue_empty(
                    use_queue=use_queue)
            except Exception as e:
                if self.is_shutting_down(
                        shutdown_event=shutdown_event):
                    self.debug_log(
                        'helper was shut down '
                        'msgs in the queue may not all '
                        'have been sent')
                else:
                    self.debug_log((
                        'helper hit an ex={} shutting down '
                        'msgs in the queue may not all '
                        'have been sent').format(
                            e))
                    not_done = True
                    self.shutdown_now = True
                return True
            # end of getting log msgs from the queue
            self.debug_log('done reading from queue')

            if self.is_shutting_down(
                    shutdown_event=shutdown_event):
                self.debug_log(
                    'build_payload - already shutting down')
                return True

            # If the payload is getting very long,
            # stop reading and send immediately.
            # Current limit is 50MB
            if self.is_shutting_down(shutdown_event=shutdown_event) \
                    or len(self.log_payload) >= 524288:
                self.debug_log(
                    'payload maximum size exceeded, sending immediately')
                return False

        self.debug_log('build_payload - done')

        return True
1216059
def payload(self, value):
    """"""
    if not isinstance(value, rdfvalue.RDFValue):
      raise RuntimeError("Payload must be an RDFValue.")

    self.Set("args", value.SerializeToString())

    # pylint: disable=protected-access
    if value._age is not None:
      self.args_age = value._age
    # pylint: enable=protected-access

    self.args_rdf_name = value.__class__.__name__
856189
async function setup (payload, ...args) {
    let msg = await store.logon(payload);
    prtUtil.print(`Logon status: ${msg}`);
    debugger;
    let {modelPublish} = await store.addServices(...args);
    console.log(store.getServices());

    let links = modelPublish.links();
    //console.log(JSON.stringify(links, null, 4));

    console.log('------------- root links');
    links.map((v,k) => {
        console.log(`rel: ${k}`);
        console.log(JSON.stringify(v.get('link'), null, 4));

    })
    
    payload = {
        qs: {
            limit: 1000
        }
    }

    let r = await store.apiCall(modelPublish.links('getPublishedModel'), payload);

    console.log('------------------ links from getPublishedModel');
    links = r.links();
    links.map((v,k) => {
        console.log(`rel: ${k}`);
        console.log(JSON.stringify(v.get('link'), null, 4));

    })

    r = await store.apiCall(r.links('up'));

    return true;
    }
510110
function DoDeploy(payload) {
    self.deploy(payload.repo, function(err) {
      if (err) {
        return self.io.emit('deploy.error', payload);
      }
      self.io.emit('deploy.complete', payload);
    });
  }
1175553
def _encode_payload(data, headers=None):
    ""
    prolog = "CONTENT_LENGTH\0%d\0SCGI\x001\0" % len(data)
    if headers:
        prolog += _encode_headers(headers)

    return _encode_netstring(prolog) + data
700025
def send(self, payload):
        
        payload = self.encode(payload)
        payload = self.sign(payload)
        self.socket.send(payload)
83286
public function prepare()
        {
            $this->setCurlOption(CURLOPT_CUSTOMREQUEST, 'PUT');

            if(isset($this->options['data'])) {
                // Data
                $data = (isset($this->options['is_payload']) && $this->options['is_payload'] === true) ? json_encode($this->options['data']) : http_build_query($this->options['data']);

                $this->setCurlOption(CURLOPT_POSTFIELDS, $data);
            }
        }