History

Fix small bugs with the HTTP request to screenshare endpoint

Zach Fox committed 7 years ago

Commit 61f08961 parent 8aea0dd1 file · +4 −6Browse files

Showing the changes to interface/src/scripting/ScreenshareScriptingInterface.cpp (1 of 1 file). Show all

Unified · Split

interface/src/scripting/ScreenshareScriptingInterface.cpp+4−6
@@ -93,18 +93,16 @@ void ScreenshareScriptingInterface::startScreenshare(const QUuid& screenshareZon · 92 unmodified lines
9393 }
9494
9595 QString currentDomainID = uuidStringWithoutCurlyBraces(addressManager->getDomainID());
96− QString requestURLPath = "api/v1/domains";
97− requestURLPath = requestURLPath.append(currentDomainID);
98− requestURLPath = requestURLPath.append("/screenshare");
96+ QString requestURLPath = "api/v1/domains/%1/screenshare";
9997
10098 JSONCallbackParameters callbackParams;
10199 callbackParams.callbackReceiver = this;
102100 callbackParams.jsonCallbackMethod = "handleSuccessfulScreenshareInfoGet";
103101 callbackParams.errorCallbackMethod = "handleFailedScreenshareInfoGet";
104102 accountManager->sendRequest(
105− requestURLPath,
103+ requestURLPath.arg(currentDomainID),
106104 AccountManagerAuth::Required,
107− QNetworkAccessManager::PutOperation,
105+ QNetworkAccessManager::GetOperation,
108106 callbackParams
109107 );
110108 }
@@ -200,7 +198,7 @@ void ScreenshareScriptingInterface::handleSuccessfulScreenshareInfoGet(QNetworkR · 89 unmodified lines
200198 }
201199
202200 void ScreenshareScriptingInterface::handleFailedScreenshareInfoGet(QNetworkReply* reply) {
203− qDebug() << "\n\n MN HERE: handleFailedScreenshareInfoGet():" << reply->errorString();
201+ qDebug() << "\n\n MN HERE: handleFailedScreenshareInfoGet():" << reply->readAll();
204202 }
205203
206204 void ScreenshareScriptingInterface::onWebEventReceived(const QUuid& entityID, const QVariant& message) {