MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / PostJsonRequest

Method PostJsonRequest

workflow.cpp:150–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148
149
150bool WorkflowMachine::PostJsonRequest(const std::string& request)
151{
152 string jsonResult;
153 if (m_function)
154 jsonResult = BNPostWorkflowRequestForFunction(m_function->GetObject(), request.c_str());
155 else
156 jsonResult = BNPostWorkflowRequestForBinaryView(m_view->GetObject(), request.c_str());
157
158 rapidjson::Document response(rapidjson::kObjectType);
159 response.Parse(jsonResult.c_str());
160 if (response.HasMember("commandStatus") && response["commandStatus"].HasMember("accepted"))
161 return response["commandStatus"]["accepted"].GetBool();
162
163 return false;
164}
165
166
167bool WorkflowMachine::Run()

Callers

nothing calls this directly

Calls 4

c_strMethod · 0.80
HasMemberMethod · 0.80
GetObjectMethod · 0.45
ParseMethod · 0.45

Tested by

no test coverage detected