mirror of
https://github.com/qicosmos/rest_rpc.git
synced 2026-08-29 16:40:48 +08:00
generic
This commit is contained in:
@@ -46,7 +46,8 @@ namespace rest_rpc {
|
||||
write();
|
||||
}
|
||||
|
||||
void pack_and_response(uint64_t req_id, std::string data) {
|
||||
template<typename T>
|
||||
void pack_and_response(uint64_t req_id, T data) {
|
||||
auto result = msgpack_codec::pack_args_str(result_code::OK, std::move(data));
|
||||
response(req_id, std::move(result));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user