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

Web and WebWorks Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Trusted Contributor
Posts: 236
Registered: ‎07-28-2010
My Device: Not Specified
My Carrier: Software Developer
Accepted Solution

How to make an http request with string parameter in BB10 development using WebWorks.

Hi All,

           I am developing an BB10 application using Webworks framework , in that i want make an http request by appending some string parameter. which type of http request i will use. any code base help.



Thanks to All

Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: How to make an http request with string parameter in BB10 development using WebWorks.

Use the XmlHttpRequest JavaScript object to make a GET request to a remote URL.




Here is an example:


var url = "http://www.yourwebsite.com/index.asp?foo=bar"
var xhr = new XMLHttpRequest();

xhr.open('GET', url, true);

xhr.onreadystatechange = function(e) {
	if (xhr.readyState === 4) {
		if (xhr.status === 200 || xhr.status === 0)  {
		else {
			console.log("Error (" + xhr.status + "): " + xhr.statusText);



Follow me on Twitter: @n_adam_stanley
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: How to make an http request with string parameter in BB10 development using WebWorks.

Always use POST if you can


I've not tried overloading BB10 in this specific way (different topic)


Using GET is dangerous as Google etc track URLs


Lets say my username is fred and my password is bloggs


Now - The GET URL will look something like this....


http://nowhere.com/?user=fred&pass=bloggs (this is a complete fake for example)


Now consider the same thing with a POST


That just goes to http://nowhere,com


I am oversimplifying this to make it easy (my several paragrphs on security were no real help)


I think I may start a blog - I detest the things - but have several servers so blog (eek) is easy so I  can address the many failings in this specific asnwer





Click the like button if you find my posts useful!