func DumpRequest(hdr *rpc.Header, body interface{}) []byte {
	msg, err := response(hdr, body)
	if err != nil {
		return []byte(fmt.Sprintf("%q", err.Error()))
	}
	data, err := json.Marshal(msg)
	if err != nil {
		return []byte(fmt.Sprintf("%q", "marshal error: "+err.Error()))
	}
	return data
}
// DumpRequest returns JSON-formatted data representing
// the RPC message with the given header and body,
// as it would be written by Codec.WriteMessage.
// If the body cannot be marshalled as JSON, the data
// will hold a JSON string describing the error.
DumpRequest returns JSON-formatted data representing
the RPC message with the given header and body,
as it would be written by Codec.WriteMessage.
If the body cannot be marshalled as JSON, the data
will hold a JSON string describing the error.
// DumpRequest returns JSON - formatted data representing // the RPC message with the given header and body // as it would be written by Codec . WriteMessage . // If the body cannot be marshalled as JSON the data // will hold a JSON string describing the error .
func DumpRequest(hdr *rpc.Header, body interface{}) []byte {
	msg, err := response(hdr, body)
	if err != nil {
		return []byte(fmt.Sprintf("%q", err.Error()))
	}
	data, err := json.Marshal(msg)
	if err != nil {
		return []byte(fmt.Sprintf("%q", "marshal error: "+err.Error()))
	}
	return data
}
func DumpRequest ( hdr * rpc . Header , body interface { } ) [ ] byte { msg , err := response ( hdr , body ) if err != nil { return [ ] byte ( fmt . Sprintf ( " " , err . Error ( ) ) ) } data , err := json . Marshal ( msg ) if err != nil { return [ ] byte ( fmt . Sprintf ( " " , " " + err . Error ( ) ) ) } return data }
DumpRequest returns JSON-formatted data representing
the RPC message with the given header and body,
as it would be written by Codec.WriteMessage.
DumpRequest returns JSON - formatted data representing the RPC message with the given header and body as it would be written by Codec . WriteMessage .