Do not overload send as this causes issues with folly::dynamic

Summary:
folly::dynamic, std::string, implicit constructors and method overloading is not a good combination.

This renames the send method to sendRaw as to avoid issues with existing plugins currently sending string params.

Reviewed By: mweststrate

Differential Revision: D38827539

fbshipit-source-id: 653f62e41ebfbe93d1af25f39c81f6b05bf84cb4
This commit is contained in:
Lorenzo Blasa
2022-08-18 09:39:42 -07:00
committed by Facebook GitHub Bot
parent 92d1f7b77a
commit d1c06c9c46
8 changed files with 12 additions and 10 deletions

View File

@@ -53,7 +53,7 @@ class FlipperConnectionImpl : public FlipperConnection {
socket_->sendMessage(message);
}
void send(const std::string& method, const std::string& params) override {
void sendRaw(const std::string& method, const std::string& params) override {
std::stringstream ss;
ss << "{"
"\"method\": \"execute\","
@@ -66,8 +66,8 @@ class FlipperConnectionImpl : public FlipperConnection {
<< "\","
"\"params\":"
<< params << "}}";
socket_->sendMessage(ss.str());
auto message = ss.str();
socket_->sendMessage(message);
}
void error(const std::string& message, const std::string& stacktrace)