MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / toString

Method toString

framework/data_source/IDataSource.cpp:105–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103 }
104
105 std::string IDataSource::SourceConfig::toString()
106 {
107 CicadaJSONItem item{};
108 item.addValue("low_speed_limit", low_speed_limit);
109 item.addValue("low_speed_time_ms", low_speed_time_ms);
110 item.addValue("connect_time_out_ms", connect_time_out_ms);
111 item.addValue("so_rcv_size", so_rcv_size);
112 item.addValue("http_proxy", http_proxy);
113 item.addValue("refer", refer);
114 item.addValue("userAgent", userAgent);
115 std::string headerStr{};
116
117 for (std::string &headerItem : customHeaders) {
118 if (!headerItem.empty()) {
119 headerStr.append(headerItem).append(";");
120 }
121 }
122
123 item.addValue("customHeaders", headerStr);
124 return item.printJSON();
125 }
126}

Callers

nothing calls this directly

Calls 3

addValueMethod · 0.80
printJSONMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected