I want to pass a parameter to the qnetworkrequest
GET method
For POST method i do
m_network = new QNetworkAccessManager(this);
QNetworkRequest request;
request.setUrl(url);
QByteArray postData;
postData.append("username=...");
postData.append("password=...");
m_network->post(request,postData);
How can I pass a parameter to the GET method?
Is this:
request.setRawHeader("ticket",".." );
the right way to do that?
i dont think so but i didnt find something appropriate..
i am trying to transform a java code to c++ in java the code is
final GetMethod get = new GetMethod(uri);
get.setQueryString(new NameValuePair[]{ new NameValuePair("alpha", string_alpha) });
client.executeMethod(get);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.