MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / receiveTextUntil

Function receiveTextUntil

Tactility/Source/network/HttpdReq.cpp:117–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117std::string receiveTextUntil(httpd_req_t* request, const std::string& terminator) {
118 size_t read_index = 0;
119 std::stringstream result;
120 while (!result.str().ends_with(terminator)) {
121 char buffer;
122 size_t bytes_read = httpd_req_recv(request, &buffer, 1);
123 if (bytes_read <= 0) {
124 return "";
125 } else {
126 read_index += bytes_read;
127 }
128
129 result << buffer;
130 }
131
132 return result.str();
133}
134
135std::map<std::string, std::string> parseContentDisposition(const std::vector<std::string>& input) {
136 std::map<std::string, std::string> result;

Callers 2

handleAppInstallMethod · 0.85
handleApiAppsInstallMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected