Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Escaping problem with Titanium.Network.HTTPClient

So,

I'm trying to do twitter searches, using the public API.

I would imaging that the correct way to do this is somehting like the code below:

var loader = Titanium.Network.createHTTPClient();    
var uri = "http://search.twitter.com/search.json?q="+escape("from:theno23");
loader.onload = function() { ... }
loader.open("GET", uri);
loader.send();

But if I do that it seems to be double-escaping the q= part, and I actually have to request something like:

var uri = "http://search.twitter.com/search.json?q="+"from:theno23";

However, this means that I can't add additional CGI arguments, as HTTPClient will escape the &s.

Is it correct that HTTPClient is escaping everything after the ? in URIs? If so, is there any way to stop it?

Thanks,
Steve

— asked August 4th 2010 by Steve Harris
  • bug
  • escape
  • escaping
  • http
  • iphone
0 Comments

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.