// Reply defines the Response status code and returns the mock Response DSL.
335831
func (r *Request) Reply(status int) *Response {
	return r.Response.Status(status)
}
538890
func (b *Bot) Reply(evt *slack.MessageEvent, msg string, typing bool) {
	if typing {
		b.Type(evt, msg)
	}
	b.RTM.SendMessage(b.RTM.NewOutgoingMessage(msg, evt.Channel))
}
555877
func (s *ChannelsService) Replies(channel string, threadTimestamp string) *ChannelsRepliesCall {
	var call ChannelsRepliesCall
	call.service = s
	call.channel = channel
	call.threadTimestamp = threadTimestamp
	return &call
}
687688
func (b *Bot) Reply(to *Message, what interface{}, options ...interface{}) (*Message, error) {
	// This function will panic upon unsupported payloads and options!
	sendOpts := extractOptions(options)
	if sendOpts == nil {
		sendOpts = &SendOptions{}
	}

	sendOpts.ReplyTo = to

	return b.Send(to.Chat, what, sendOpts)
}
1208074
func (a *adapter) Reply(res *hal.Response, strings ...string) error {
	for _, str := range strings {
		s := res.UserName() + `: ` + str
		err := a.writeString(s)
		if err != nil {
			log.Println("error: ", err)
			return err
		}
	}

	return nil
}
579838
func (r *Reply) Error() (string, error) {
	if r.Type() != ReplyError {
		return "", ErrType
	}
	return string(r.stringValue), nil
}
264556
func (m *Messenger) Response(to int64) *Response {
	return &Response{
		to:    Recipient{to},
		token: m.token,
	}
}
504637
func Response(service string, response []MockResponse) client.Option {
	return func(o *client.Options) {
		r, ok := fromContext(o.Context)
		if !ok {
			r = make(map[string][]MockResponse)
		}
		r[service] = response
		o.Context = newContext(o.Context, r)
	}
}
865357
func (raw *Raw) Response(endpoint string, q *QueryOptions) (io.ReadCloser, error) {
	return raw.c.rawQuery(endpoint, q)
}
1105655
func (r *Request) ReplyFunc(replier func(*Response)) *Response {
	replier(r.Response)
	return r.Response
}
1361898
func (r *Packet) Reply(payload interface{}, err error) ([]byte, error) {
	p := new(Packet)

	status := uint32(StatusSuccess)

	if err != nil {
		status = errorStatus(err)
	} else {
		p.Payload, err = MarshalBinary(payload)
		if err != nil {
			return nil, err
		}
	}

	p.Header = Header{
		Version:     HeaderVersion,
		Dummy:       OpNewHeader,
		PacketSize:  headerSize + uint32(len(p.Payload)),
		HeaderSize:  headerSize,
		RequestID:   r.RequestID,
		Op:          r.Op,
		Status:      status,
		Flags:       PacketFlagReply,
		Information: 0,
		SessionID:   r.SessionID,
	}

	if Trace {
		rc := "OK"
		if err != nil {
			rc = err.Error()
		}
		fmt.Fprintf(os.Stderr, "[hgfs] response %#v [%s]\n", p.Header, rc)
	} else if err != nil {
		log.Printf("[hgfs] op=%d error: %s", r.Op, err)
	}

	return p.MarshalBinary()
}
1180649
func (m *ReceivedMessageImpl) Respond(msg *proto.GossipMessage) {
	sMsg, err := msg.NoopSign()
	if err != nil {
		err = errors.WithStack(err)
		m.conn.logger.Errorf("Failed creating SignedGossipMessage: %+v", err)
		return
	}
	m.conn.send(sMsg, func(e error) {}, blockingSend)
}
567829
func (r *OpenRequest) Respond(resp *OpenResponse) {
	buf := newBuffer(unsafe.Sizeof(openOut{}))
	out := (*openOut)(buf.alloc(unsafe.Sizeof(openOut{})))
	out.Fh = uint64(resp.Handle)
	out.OpenFlags = uint32(resp.Flags)
	r.respond(buf)
}
690939
func (p *Proxy) replyError(err error, w http.ResponseWriter, req *http.Request) {
	proxyError := convertError(err)
	statusCode, body, contentType := p.options.ErrorFormatter.Format(proxyError)
	w.Header().Set("Content-Type", contentType)
	if proxyError.Headers() != nil {
		netutils.CopyHeaders(w.Header(), proxyError.Headers())
	}
	w.WriteHeader(statusCode)
	w.Write(body)
}
743989
func ReplySyntaxError(response string) *Reply {
	if len(response) > 0 {
		response = " (" + response + ")"
	}
	return &Reply{501, []string{"Syntax error" + response}, nil}
}
1150319
func (c *Conversation) Reply(text string, a ...interface{}) {
	prefix := ""

	if !c.message.IsDirectMessage() {
		prefix = "<@" + c.message.User() + ">: "
	}

	msg := c.message
	msg.SetText(prefix + fmt.Sprintf(text, a...))

	c.send(msg)
}
17264
func (m *Message) Response(data Response) error {
	if m.CompletionCode() != CommandCompleted {
		return m.CompletionCode()
	}
	return messageDataFromBytes(m.Data, data)
}