target:     the url to receive the payload.
        payload:    a python primitive data structure
        instance:   a possibly null "trigger" instance
        hook:       the defining Hook object (useful for removing)
344206
def run(self, target, payload, instance=None, hook_id=None, **kwargs):
        
        response = requests.post(
            url=target,
            data=json.dumps(payload, cls=DjangoJSONEncoder),
            headers={'Content-Type': 'application/json'}
        )

        if response.status_code == 410 and hook_id:
            HookModel = get_hook_model()
            hook = HookModel.object.get(id=hook_id)
            hook.delete()
188247
def run(self, target, payload, instance_id=None, hook_id=None, **kwargs):
        
        requests.post(
            url=target,
            data=json.dumps(payload),
            headers={
                'Content-Type': 'application/json',
                'Authorization': 'Token %s' % settings.HOOK_AUTH_TOKEN
            }
        )
1260386
def ReadTrigger(self, trigger_link, options=None):
        
        if options is None:
            options = {}

        path = base.GetPathFromLink(trigger_link)
        trigger_id = base.GetResourceIdOrFullNameFromLink(trigger_link)
        return self.Read(path, 'triggers', trigger_id, None, options)
5598
def update
      url = single_url
      payload = attributes_to_payload
      payload[:reset_data] = true
      to_server url, payload
    end
983528
def _handle_actiongeturl(self, _):
        """"""
        obj = _make_object("ActionGetURL")
        obj.UrlString = self._get_struct_string()
        obj.TargetString = self._get_struct_string()
        yield obj
673708
def _grabContentFromUrl(self, url):
        
        # Defining an empty object for the response
        info = {}
                
        # This part has to be modified...        
        try:            
            # Configuring the socket
            queryURL = "http://" + self.info["host"] + ":" + self.info["port"] + "/" + url
            response = urllib2.urlopen(queryURL)

            # Rebuilding data to be processed
            data = str(response.headers) + "\n"

            data += response.read()

            # Processing data as expected
            info = self._createDataStructure(data)     
            
        # Try to make the errors clear for other users
        except Exception, e:
            errMsg = "ERROR Exception. Something seems to be wrong with the Zeronet Bundler."   
            raise Exception( errMsg + " " + str(e))        
            
        return info
1128316
def payload(self, p):
        
        if isinstance(p, tuple):
            k = p[0]
            v = p[1]
            self.actual_content_type = k
            self._payload[k] = v
        else:
            self._payload = {defines.Content_types["text/plain"]: p}
579038
def throw_to(self, target, *a):
        self.ready.append((getcurrent(), ()))
        
        return target.throw(*a)
69970
def trigger(self, *args, **kwargs):
		
		current = self.name.split('/')
		while current:
			name = '/'.join(current)
			current.pop()
			if name in self.context.handlers:
				self.all_handlers += [(name, h) for h in self.context.handlers[name]] 
				if name == self.name:
					self.handlers += self.context.handlers[name]

		for name, handler in self.all_handlers:
			res = handler(self, *args, **kwargs)
			self.all_executed += 1
			self.all_result.append(res)
			if name == self.name:
				self.executed += 1
				self.result.append(res)
			if self.stopped:
				break

		self.all_handlers = [h for name, h in self.all_handlers]
113339
def safe_send(self, connection, target, message, *args, **kwargs):
        
        # Compute maximum length of payload
        prefix = "PRIVMSG {0} :".format(target)
        max_len = 510 - len(prefix)

        for chunk in chunks(message.format(*args, **kwargs), max_len):
            connection.send_raw("{0}{1}".format(prefix, chunk))
250930
def _grabContentFromUrl(self, url):
        
        # Defining an empty object for the response
        response = {}

        # This part has to be modified...        
        try:
            import urllib2

            # Grabbing the data      
            data = urllib2.urlopen(url).read()

            # Processing the data as expectesd
            response = self._createDataStructure(data)        
            
        # Try to make the errors clear for other users
        except Exception, e:
            errMsg = "ERROR. Something happened."   
            raise Exception( errMsg + " " + str(e))
            
        return response
292371
function request(url, payload) {
  return fetch(url, {
    headers: {
      'content-type': 'application/json',
    },
    method: 'POST',
    timeout: 1000,
    body: JSON.stringify(payload),
  })
    .then((response) => response.json())
    .then(() => BbPromise.resolve())
    .catch(() => BbPromise.resolve());
}
481074
def payload(self):
        
        payload = {'type': self.resource_type(), 'attributes': self.attributes}
        if self.id:
            payload['id'] = self.id
        return payload
1189731
def _send_notification(self, handle, payload):
        

        self.bable.notify(
            connection_handle=self._connection_handle,
            attribute_handle=handle,
            value=payload
        )
28600
def send_and_receive_raw(self, target, lun, netfn, raw_bytes):
        
        return self._send_and_receive(target=target,
                                      lun=lun,
                                      netfn=netfn,
                                      cmdid=array('B', raw_bytes)[0],
                                      payload=raw_bytes[1:])
444219
def send_request(self, target: str, *args, **kwargs):
        
        # TODO: Log error here if not found?
        address = self._get_address_from_source(target)
        if address is None:
            return

        args = json.dumps(args).encode('utf8')
        kwargs = json.dumps(kwargs).encode('utf8')

        # TODO: test that this works
        # NOTE: pop out command?
        frame = (*address, b'', b'MSG', args, kwargs)
        self.add_callback(self.command_socket.send_multipart, frame)
14809
function (context, payload) {
        var state = context.state;
        var entity = state.$name;
        // If the payload is an array, then the payload should be an array of
        // data so let's pass the whole payload as data.
        if (Array.isArray(payload)) {
            return context.dispatch(state.$connection + "/update", { entity: entity, data: payload }, { root: true });
        }
        // If the payload doesn't have `data` property, we'll assume that
        // the user has passed the object as the payload so let's define
        // the whole payload as a data.
        if (payload.data === undefined) {
            return context.dispatch(state.$connection + "/update", { entity: entity, data: payload }, { root: true });
        }
        // Else destructure the payload and let root action handle it.
        return context.dispatch(state.$connection + "/update", __assign({ entity: entity }, payload), { root: true });
    }