Send a raw JSON-RPC message.

        The *message* argument must be a dictionary containing a valid JSON-RPC
        message according to the version passed into the constructor.
962337
def send_message(self, message):
        
        if self._error:
            raise compat.saved_exc(self._error)
        elif self._transport is None:
            raise JsonRpcError('not connected')
        self._version.check_message(message)
        self._writer.write(serialize(message))
661213
def send(self, message):
        
        url = '{0}message'.format(self.remote)
        data = self._wrap_post_data(content=message)
        res = requests.post(url, data=data, timeout=self.timeout)
        if res.status_code == requests.codes.ok:
            res_data = json.loads(self._convert_bytes(res.content))
            if res_data.get('status') == STATUS_SUCCESS:
                return True, res_data.get('message')
            return False, res_data.get('message')
        res.raise_for_status()
        return False, 'Request or Response Error'
1267672
def arg(params)
      rpc_desc.input.decode_json(params.reject { |k, _v| k == :selections }.to_json)
    end
1136886
public function send($raw_message = null)
    {
        // Set Optional Message Data
        if (!is_null($raw_message)) {
            $send_result = $this->sendRawMessage($raw_message);
        } else {
            $send_result = $this->sendMessage();
        }

        // Reset to default after send
        $this->restoreDefaultMessageType();

        return (bool) $send_result;
    }
307780
def send_message(host, data, timeout=None, properties=None):
    
    channel = _get_channel(host, timeout)

    if not properties:
        properties = pika.BasicProperties(
            content_type="application/json",
            delivery_mode=2,
            headers={"UUID": str(uuid.uuid4())}
        )

    parameters = settings.get_amqp_settings()[host]

    channel.basic_publish(
        exchange=parameters["exchange"],
        routing_key=parameters["in_key"],
        properties=properties,
        body=data
    )
89314
def post_json(self, uri, data, **kwargs):
        
        encoded_data = json.dumps(data)
        kwargs.setdefault("headers", {}).update({
            "Content-Type": "application/json",  # tell server we are sending json
        })
        return self.post(uri, data=encoded_data, **kwargs)
1093710
def send_json_message(address, message, **kwargs):
    

    data = {
        'message': message,
    }

    if not kwargs.get('subject_id'):
        data['subject_id'] = address

    data.update(kwargs)

    hxdispatcher.send(address, data)
869826
async def rpc_message(self, request, message):
        ''''''
        await self.pubsub.publish(self.channel, message)
        return 'OK'
1296343
def send(self, from_client, message, to_clients=None, transient=False, push_data=None):
        
        if isinstance(message, dict):
            message = json.dumps(message)
        params = {
            'from_peer': from_client,
            'conv_id': self.id,
            'transient': transient,
            'message': message,
        }
        if to_clients:
            params['to_peers'] = to_clients
        if push_data:
            params['push_data'] = push_data
        client.post('/rtm/messages', params=params).json()
1038709
def send(self, message):  # usually a json string...
        
        for transport in self.transports.values():
            transport.protocol.sendMessage(message)
659424
def send_message(client, payload)
      message = JSON.generate(payload)
      @logger.debug("SENT: #{client} #{message}")

      EM.schedule do
        nats.publish(client, message)
      end
    end
824400
def send_message(message, pipe='public'):
    
    if pipe not in ['public', 'private']:
        raise ValueError('pipe argument can be only "public" or "private"')
    else:
        pipe = pipe.upper()

    pipe_path = PUBLIC_PIPE if pipe == 'PUBLIC' else PRIVATE_PIPE

    # create file if it doesn't exist, append contents
    pipeout = open(pipe_path, 'a')

    pipeout.write('%s\n' % message)
    pipeout.close()
1206093
def send(self, message):
        
        message = message.SerializeToString()
        self.socket.sendall(struct.pack('!I', len(message)) + message)

        length = struct.unpack('!I', self.socket.recv(4))[0]
        response = riemann_client.riemann_pb2.Msg()
        response.ParseFromString(socket_recvall(self.socket, length))

        if not response.ok:
            raise RiemannError(response.error)

        return response
308371
def send_result(self, additional_dict):
        '''
        
        '''
        self.send_response(200)
        self.send_header("Content-type", "application/json")
        response = {
            'jsonrpc': self.req_rpc_version,
            'id': self.req_id,
        }
        response.update(additional_dict)
        jresponse = json.dumps(response)
        self.send_header("Content-length", len(jresponse))
        self.end_headers()
        self.wfile.write(jresponse.encode())
380478
def sendMessage(self,chat_id,text,parse_mode=None,disable_web=None,reply_msg_id=None,markup=None):
		'''  '''
		payload={'chat_id' : chat_id, 'text' : text, 'parse_mode': parse_mode , 'disable_web_page_preview' : disable_web , 'reply_to_message_id' : reply_msg_id}
		
		if(markup):
			payload['reply_markup']=json.dumps(markup)
			
		response_str = self._command('sendMessage',payload,method='post')
		
		return _validate_response_msg(response_str)
1274402
def _send(self, params):
        
        # Get a response
        try:
            r = requests.get(self.url, params=params)
        # catch errors, print then exit.
        except requests.exceptions.RequestException as e:
            print(e)
        return r.json(strict=False)
542415
def _reply_json(self, json_payload, status_code=200):
        
        self._send_headers(status_code=status_code)
        json_str = json.dumps(json_payload)
        self.wfile.write(json_str)