MCPcopy Create free account
hub / github.com/NixOS/nix / encodeQuery

Function encodeQuery

src/libutil/url.cc:309–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309std::string encodeQuery(const StringMap & ss)
310{
311 std::string res;
312 bool first = true;
313 for (auto & [name, value] : ss) {
314 if (!first)
315 res += '&';
316 first = false;
317 res += percentEncode(name, allowedInQuery);
318 res += '=';
319 res += percentEncode(value, allowedInQuery);
320 }
321 return res;
322}
323
324std::string renderUrlPathNoPctEncoding(std::span<const std::string> urlPath)
325{

Callers 4

renderMethod · 0.85
parseURLRelativeFunction · 0.85
to_stringMethod · 0.85
TEST_FFunction · 0.85

Calls 1

percentEncodeFunction · 0.85

Tested by

no test coverage detected