-2
我有一行代码我想在aRequest中设置具有布尔值的参数。如何在qt C++中设置它?在http中设置参数get请求在qt中C++
else if(requestPath.startsWith("/internal/Services")){ // note URL is /internal/...
windowsservice().service(aRequest, aResponse)
}
我有一行代码我想在aRequest中设置具有布尔值的参数。如何在qt C++中设置它?在http中设置参数get请求在qt中C++
else if(requestPath.startsWith("/internal/Services")){ // note URL is /internal/...
windowsservice().service(aRequest, aResponse)
}
随着对你的代码中的一些假设,尝试这样的事情:
auto url = aRequest.url();
QUrlQuery query{url};
query.addQueryItem("boolparam", "1");
url.setQuery(query);
aRequest.setUrl(url);
什么是'aRequest'? 'service()'做了什么?它是否发送POST或GET请求? – w1ck3dg0ph3r
那么,我的意思是它QNetworkRequest或其他? – w1ck3dg0ph3r