Send a reply for a synchronous request sent by send_request.
        The first argument should be an instance of EventRequestBase.
        The second argument should be an instance of EventReplyBase.
779181
def reply_to_request(self, req, rep):
        

        assert isinstance(req, EventRequestBase)
        assert isinstance(rep, EventReplyBase)
        rep.dst = req.src
        if req.sync:
            req.reply_q.put(rep)
        else:
            self.send_event(rep.dst, rep)
939960
def send(self, **kwargs):
        
        payload = self.api_payload()
        payload.update(**kwargs)
        return self.api_method()(**payload)
977711
def call_no_reply(self, fn, *args, **kwargs):
        
        LOG.debug('%r.call_no_reply(): %r', self, CallSpec(fn, args, kwargs))
        self.context.send(self.make_msg(fn, *args, **kwargs))
706126
function RAgent_send(name, body, cb) {
  if (!this._session) return

  var reqID = this._nextReqID()

  this._requestCBs.set(reqID, cb)

  var message = {
    type: "request",
    name: name,
    to:   this.info.id,
    id:   reqID,
    body: body
  }

  this._session._sendMessage(message)
}
243086
def _sendRequest(self, tReq):
        """"""
        try:
            tReq.sent = True
            self.proto.sendString(tReq.data)
        except Exception as e:
            log.exception('%r: Failed to send request %r', self, tReq)
            del self.requests[tReq.id]
            tReq.d.errback(e)
        else:
            if not tReq.expect:
                # Once we've sent a request for which we don't expect a reply,
                # we're done, remove it from requests, and fire the deferred
                # with 'None', since there is no reply to be expected
                del self.requests[tReq.id]
                tReq.d.callback(None)
591604
def _replies(self, *args, **kwargs):
        """"""
        reply_msg = make_reply(*args, **kwargs)
        if self._server:
            self._server._log('\t%d\t<-- %r' % (self.client_port, reply_msg))
        reply_bytes = reply_msg.reply_bytes(self)
        self._client.sendall(reply_bytes)
507520
private void sendRequest(Object request, ContextualFuture future) {
    if (open && connection.open) {
      long requestId = ++this.requestId;
      futures.put(requestId, future);
      connection.handleRequest(requestId, request);
    } else {
      future.context.executor().execute(() -> future.completeExceptionally(new ConnectException("connection closed")));
    }

    if (request instanceof ReferenceCounted) {
      ((ReferenceCounted<?>) request).release();
    }
  }
806632
def post(self, request, *args, **kwargs):
        
        serializer = EventSerializer(data=request.data)

        if not serializer.is_valid():
            return Response(
                {"accepted": False, "reason": serializer.errors}, status=400
            )

        data = serializer.validated_data

        event_type = {
            "ack": "ack",
            "nack": "nack",
            "delivery_report": "delivery_succeeded",
        }.get(data["event_type"])

        accepted, reason = process_event(
            data["user_message_id"], event_type, data["nack_reason"], data["timestamp"]
        )

        return Response(
            {"accepted": accepted, "reason": reason}, status=200 if accepted else 400
        )
875
def post(self, request, *args, **kwargs):
        
        schedule_disable.delay(kwargs["subscription_id"])
        return Response({"accepted": True}, status=201)
1324092
public void sendRequest(Message request, Message.Builder responseBuilder) {
    sendRequest(request, null, responseBuilder, Duration.ZERO);
  }
755489
def reply(self, text, in_thread=None):
        
        if in_thread is None:
            in_thread = 'thread_ts' in self.body

        if in_thread:
            self.send(text, thread_ts=self.thread_ts)
        else:
            text = self.gen_reply(text)
            self.send(text)
186184
def send_response_message(self, request_id, meta, body):
        
        self.response_messages.append((request_id, meta, body))
777381
def send(self, **kwargs):
        
        merged_kwargs = {}
        merged_kwargs.update(self.kwargs)
        merged_kwargs.update(kwargs)
        try:
            self.response = self.session.request(self.method,
                                                self.url, **merged_kwargs)
        except Exception as e:
            self.exception = e
            self.traceback = traceback.format_exc()
        return self
311805
def send_with_reply_and_block(self, message, timeout = DBUS.TIMEOUT_USE_DEFAULT, error = None) :
        ""
        if not isinstance(message, Message) :
            raise TypeError("message must be a Message")
        #end if
        error, my_error = _get_error(error)
        reply = dbus.dbus_connection_send_with_reply_and_block(self._dbobj, message._dbobj, _get_timeout(timeout), error._dbobj)
        my_error.raise_if_set()
        if reply != None :
            result = Message(reply)
        else :
            result = None
        #end if
        return \
            result
610821
private void reply(final String response, final boolean error,
            final String errorMessage, final String stackTrace,
            final String statusCode, final int statusCodeInt,
            Map<String, List<String>> responseHeaders) {

        if (!sentReply) {
            // must update sentReply first to avoid duplicated msg.
            sentReply = true;

            final ResponseOnSingeRequest res = new ResponseOnSingeRequest(
                    response, error, errorMessage, stackTrace, statusCode,
                    statusCodeInt, PcDateUtils.getNowDateTimeStrStandard(),
                    responseHeaders);
            if (!getContext().system().deadLetters().equals(sender)) {
                sender.tell(res, getSelf());
            }
            if (getContext() != null) {
                getContext().stop(getSelf());
            }
        }

    }
258969
def post(self, request, *args, **kwargs):
        
        # Ensure that we check for the 'data' key in the request object before
        # attempting to reference it
        if "data" in request.data:
            # This is a workaround for JSONField not liking blank/null refs
            if "metadata" not in request.data["data"]:
                request.data["data"]["metadata"] = {}

            if "initial_sequence_number" not in request.data["data"]:
                request.data["data"]["initial_sequence_number"] = request.data[
                    "data"
                ].get("next_sequence_number")

            subscription = SubscriptionSerializer(data=request.data["data"])
            if subscription.is_valid():
                subscription.save()
                # Return
                status = 201
                accepted = {"accepted": True}
                return Response(accepted, status=status)
            else:
                status = 400
                return Response(subscription.errors, status=status)
        else:
            status = 400
            message = {"data": ["This field is required."]}
            return Response(message, status=status)
1321041
def send_response(self, code, message=None):
        
        self.log_request(code)
        self.send_response_only(code, message)
        self.send_header('Server', self.version_string())
        self.send_header('Date', self.date_time_string())