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
BlackBerry Development Advisor
Posts: 143
Registered: ‎03-08-2012
My Device: Z10
My Carrier: Bell

Re: I can't find a way to make XML-RPC calls through a QT library - Tapatalk Forums App

According to the login / logout docs, the login request is a post request.  The parameters should be encoded in the data sent, not in the URL.  You have code to do that in your script bt I suspect you are not calling the post function.

Developer
Posts: 134
Registered: ‎02-24-2013
My Device: BlackBerry Z10 LE
My Carrier: Telcel

Re: I can't find a way to make XML-RPC calls through a QT library - Tapatalk Forums App

Can you give me any little example to make a successfull post method?

 

If it's in c++ to bring it to cascades would be better.

 

Thanks!

Highlighted
BlackBerry Development Advisor
Posts: 143
Registered: ‎03-08-2012
My Device: Z10
My Carrier: Bell

Re: I can't find a way to make XML-RPC calls through a QT library - Tapatalk Forums App

Here is a stripped down example from one of my old sample apps with some info disguised ...

 

	// Create and send the network request
	const QUrl requestURL("https://xxxxx/yyyyyyyy");
	QNetworkRequest *request = new QNetworkRequest(requestURL);

	// Create QVariantMap for post data
	QVariantMap postData;
	// Populate each object with data
	postData["Subject"] = subject;
	postData["Text"] = text;

	JsonDataAccess jda;
	QByteArray postBytes;
	jda.saveToBuffer(postData, &postBytes);

	m_networkAccessManager->post(*request, postBytes);

 In your case, you take you parameter QString and convert it to a QByteArray for the post data.

 

Hope this helps.