Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 85
Registered: ‎06-22-2013
My Device: N/A
My Carrier: N/A

send request POST with no parameters

i'm using this function to send POST to a service with no parameters in this POST request .

is dose not work using this function ,it works only with parameters POST

 


void GenericNews::requestNetwork(QString url) {


QUrl serviceUrl = QUrl(url);

QByteArray data;
QUrl params;

QNetworkAccessManager *networkManager = new QNetworkAccessManager(this);


QNetworkRequest request(serviceUrl);

 

request.setHeader(QNetworkRequest::ContentTypeHeader,"application/x-www-form-urlencoded");

 

QNetworkReply *reply = networkManager->post(request,"");

 

}