MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / buildRequestBody

Function buildRequestBody

libraries/katabasis/src/DeviceFlow.cpp:352–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350
351namespace {
352QByteArray buildRequestBody(const QMap<QString, QString> &parameters) {
353 QByteArray body;
354 bool first = true;
355 foreach (QString key, parameters.keys()) {
356 if (first) {
357 first = false;
358 } else {
359 body.append("&");
360 }
361 QString value = parameters.value(key);
362 body.append(QUrl::toPercentEncoding(key) + QString("=").toUtf8() + QUrl::toPercentEncoding(value));
363 }
364 return body;
365}
366}
367
368bool DeviceFlow::refresh() {

Callers 1

refreshMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected