MCPcopy Create free account
hub / github.com/MultiMC/Launcher / buildRequestBody

Function buildRequestBody

libraries/katabasis/src/DeviceFlow.cpp:343–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341
342namespace {
343QByteArray buildRequestBody(const QMap<QString, QString> &parameters) {
344 QByteArray body;
345 bool first = true;
346 foreach (QString key, parameters.keys()) {
347 if (first) {
348 first = false;
349 } else {
350 body.append("&");
351 }
352 QString value = parameters.value(key);
353 body.append(QUrl::toPercentEncoding(key) + QString("=").toUtf8() + QUrl::toPercentEncoding(value));
354 }
355 return body;
356}
357}
358
359bool DeviceFlow::refresh() {

Callers 1

refreshMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected