Community Questions & Answers
TCP socket write blob
Hi, I want to write a blob into a tcp socket using the HTTP protocol. If I try to write only text, the response is read correctly, but when I insert a file (video or image) i got a wrong string and the client remains hanging. I think the problem is that...
Android probelm with HTTPClient
I'm porting my iPhone app over to Android and am having a problem with the HTTP Client. Here is my code: ~~~ win.refresh = function() { activity.show(); var loader = Titanium.Network.createHTTPClient(); loader.setTimeout(10000); loader.onload =...
Load more Data from Remote db to tableview
Hello everybody. I am trying to use the Dynamic scrolling Feature from the kitchensink example to load more Data from my Remote datasbase. Currently the Function loaddata consisting of a http Request Creates a Row for the 10 newest entries from the...
send file to app TCPSocket
Hi What I would like to achieve is that send a file from the web browser to the app, on the app side, I need to receive the file and be able to process it. for?example In the browser, key in http://192.168.11.1:1234/app and inside the app, listen for the...
Problems with xhr.setRequestHeader() and content-type
I am trying to talk with an api over post and json. But its keep sending the content-type as `application/x-www-form-urlencoded; charset=utf-8` ~~~ var xhr = Titanium.Network.createHTTPClient(); xhr.onload = function() { ...
RTSP / iOS HTTP media streaming
Hi. Is the latest version finally supports stable video playback from RTSP and iOS HTTP streaming sources? Thanks!
I have a .cer file for https connection,how to use the same in Titanium HttpClient Connection?
I have a .cer file for https connection,how to use the same in Titanium HttpClient Connection? I need to access some HTTPS services that request the user to authenticate with a valid X.509 certificate. Query is similar to the one in...
Titanium web app OPTIONS instead of GET
I'm trying to compile a Titanium app for Web. When I try to contact the server via http request in the browser console I see a OPTIONS method instead of a GET method: ~~~ var request = Ti.Network.createHTTPClient(); request.open('GET', url); ...
JSON http request working example here
I looked around and saw several questions about how to make this work, but no complete example for noob's like me. (or at least I didn't find one) So here is one: **sample.php** ~~~ <?php echo...
How to delay the code to be executed below the xhr.send()
Hi, I am sending some post request and i get the result on xhr.onload(). I am using a global variable that it's value will be the json in result and the variable will be available out of the function. The issue is that the code after the xhr.send is...
Making a HTTP-GET Request with Titanium.Network.createHTTPClient()
I am working with Titanium Studio and I have to make an HTTP get request to Couchdb. This is my code: ~~~ var url ="http://192.168.0.152:5985/hello_world/00a271787f89c0ef2e10e88a0c0001f4"; var json; var xhr =...
Restful HTTPClient open Digest Auth
Hi everyone developing with Titanium Dev. Im building an App that uses a Web Service API to get the info from the servers. Well... it uses Digest auth for every request. Is there any way to auth with Digest? Thanks
Problem Ti mobile 1.1: In case of http redirect - wrong / truncated user-agent sended...
Hi, in case of a http redirect (location) the sended http user-agent will be truncated and not the same then before... This could lead to authentication problems on some websites or webservices.... Problem should be fixed in ASIHTTPRequest.m -> Line...
Packaging failed. HTTP status: 400
For the last week or so, I haven't been able to distribute my package -- I always get the following error: Packaging failed. HTTP status: 400 So besides the obvious question of "how can I fix this?", I have two other related questions: 1....
JSON parser broken
Well, it seems that it's not an error. This is the way Titanium represents JSON objects. Please ignore my post! Thanks! ========== Hi guys, Do you have problems with JSON parsing after getting some data out Titanium Network HTTP client in the Android...
HttpResponseException Internal Server Error on Android for HTTPClient
I have the following HTTPClient code: ~~~ var client = Titanium.Network.createHTTPClient(); client.onload = function(){ if (client.status === 200) { Titanium.API.error('ResponseText: ' + this.responseText); success(); } else...
How to attach filename to image being uploaded to a server?
The kitchen sink code works fine in sending the binary data across to the server but I want to attach a filename to it so that I don't have to change my existing server side code which is talking to other clients also like Flex, Android etc. Currently...
Packaging failed. HTTP status: 100
Hi All I'm using Ti to develop a desktop App. Using Ti 1.2.1 My App is built using HTML5 and CSS3 along with a few SWF files. All the HTML content works perfectly on my local machine when viewed using Safari (Mac). Most of the development work is done...
Connect to local machine with the android emulator
I would like to, while developing, connect to my local machine. But, it looks like 127.0.0.1 connects to the emulator itself, and setting my hosts file on my windows computer does not seem to be working either. Is there a solution for this? So far I have...
XHR/HTTP onload loop not working
Hi Folks, Im having some problems... Im trying to download a remote file. The below code works when downloading one file (rather than as a loop), but in the loop it refuses to work! It seems that the XHR/fileDownloader onload function isn't firing after...
HTTPClient - Set a proxy with a Digest Auth
Did anyone ever manage to make an http call through a proxy server using a digest access authentication? I tried with basic authentication, but if I set the proxy and the username+password from the network settings, my http request will crash the whole...
RTSP / iOS HTTP media streaming
Hi. Is the latest 2.5 version finally supports stable video playback from RTSP and iOS HTTP streaming sources? Thanks!
Getting a file size from a server before downloading it
Is there a way to get the file size of say a zip file before it gets downloaded. As detailed in this post...
Local HTTPRequest
Hi! Is it possible to fetch a local file packaged within the app using the HTTPClient? If so - how? Thanks in advance /Jacob
How to send espacially characters with a http post request
Hello! I am developing an android app with the 1.7.0.RC1 Titanium SDK. Now i try to realise a http post request. The post request should submit text from a textarea. The text can contain espacially characters. My code looks like this: ~~~ var url =...
HTTPClient context
I'm trying to understand the context that the HTTPClient .onload functions will execute in. Currently building for Mac/PC/iPhone & Android from a common code base, working fairly well (custom C++ modules across all) but I don't want to write code...
yahoo query language data availiable only local block
In yql function call is made then data is availiable only local block i want to use the data globally for example ~~~ var data; Titanium.Yahoo.yql('select *from xml where url="http://www....../"',function(e) { data=e.data; }); ~~~ in this example...
HTTP Loader inside another loader
Hi everybody. Here is the thing: I make a normal loader, but i need to call another loader from the first one, like this: ~~~ var sendNumbers = function(selected) { var loadaux = Titanium.Network.createHTTPClient(); ...
Generic class to fetch resources over HTTP
Hi All, i'm trying to create a general class which i can instantiate, fetch a resource and let my other code know the resource has been fetched, as it can continue script execution (as synchronous mode does not function properly). The thing i keep...
request time failed: java.net.SocketException: Address family not supported by protocol
I am trying to post xml data using suds.js Getting an error message
HttpClient Gzip Encoding on Android?
Are there plans to support gzip http encoding on android too?. It works quite well on iphone and it would be rather nice to have it on android too.
Intercept http request for image
Hi all, I want to know if it's possible to intercept the http request of any image got from a server? It's for waiting the real showing of the image and do not create an image view before. Thanks a lot. M.
Phone call during uploading a picture
Hello, I need to upload some photos or videos to a server with my app. What happens if the user receive a phone call ? Does it continue in background ? If no, what should I do to finish uploading correctly ? Regards
xml parsing on first load
Hi, I am facing very strange issue in parsing xml. XML parsing fails to parse the xml response on the first loading of application in the ipad simulator as well as device. If I completely quit the application and if reopen it, it works!!!! On the very...
Can you compress a JSON call?
Hey Guys I am sending data to a webservice for processing, before it is magically sent back to the device to display nice useful data to the user. The problem is I am potentially going to be sending a LOT of GPS coordinates. I really want the app to...
XHR Send Photo from Gallery - iPad 4.2
I am having trouble sending an image from the gallery in iPad. This seems limited to iOS 4.2 -- 3.2 works fine. After selecting the image, I attempt to send it through a new HTTPClient and immediately receive this error. ~~~ IN ERROR Error...
Can't install Titanium Developer on XP Pro SP3
Hello, Just downloaded the Titanium Developer MSI and tried to run it on my system, and I get the error "Could not query info: Invalid HTTP Status Code (0)" I see a similar thread but for Windows7, and saw in that thread a recommendation to...
SOCKS proxy required for Titanium Developer?
I am trying to install and use Titanium Developer on Windows XP in an environment that does not allow direct Internet access, and no SOCKS proxy is available. Only pure HTTP and HTTPS proxy functionality is available. Is it possible to get Titanium...
Play audio on Android
Hey, I'm creating an audio streamer by hand. The problem is that I need to progressive download the audio data, that's why I didn't use the Titanium's audio streamer. I'm using Titanium.Network.HTTPClient. How may I feed an audio buffer with the data...
Waiting for an HTTP Client to finish loading?
I am trying to build an app that is 100% based around getting information from web pages. I am brand new to Appcelerator. Right now according to my logging, my app tries to get the information from the web page, then leaves the function and displays that...
Need help on Ti.Network.createHTTPClient()
~~~ function getXmlResponse(xmlParams) { var doc; var xmlHttpRequest = Ti.Network.createHTTPClient(); var url = <my_webservice_url> + <xmlParams>; xmlHttpRequest.open('GET', url); xmlHttpRequest.send(); ...
FYI - 1.5.0 HttpClient sync call borken
Hope it saves someone else some time, but synchronous calling using the HttpClient is borken in 1.5.0GA. The application just quits. Going to 1.5.1 works fine.
1.5 RC2: Showstopper HTTPClient problem in status() method
RC2 seems fully unable to return correct HTTP status. It was perfectly working in 1.4.x. Method status() always returns -1. How am I supposed to detect a 404, or any other error that still returns data? ~~~ function showProblem() { var xhr =...
Ti.Utils.base64encode returns object. How do I get a string?
[The API Docs](http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Utils.base64encode-method.html) state that Ti.Utils.base64encode returns a string. However, I'm getting an object of type 'TiBlob'. Is there a way I can get the actual string...
Can't install Titanium - Error when downloading the Mobile SDK
I've downloaded and installed the Java and Android files in the Getting Started guide, but when I go to install the Titanium Developer.msi file, it gets all the way to the 'downloading and extracting Mobile SDK' part, then I get this error: Could not...
What does api.appcelerator.net do?
I have noticed that when I attempt a simple http request - the app (in the simulator) also tries to connect by https to api.appcelerator.net (which resolves to an amazonaws ec2 server). Why would this be needed? What data is being passed there?
Download and parse a JSON file
Hey! I need to acces to a webservice; that returns me a JSON file... The service is set on Force Download; so i think i must write in a file; then read it. There is no result; so here's my code; if anyone can help me: ~~~ var xhr3 =...
Problem parsing JSON array from an API.
I have been trying hard to parse this array, but without any success. I am trying to parse an JSON array which sent as result to call to envato API. Here is the code: ~~~ function loadPosts() { var data = []; var xhr =...
How to pass a null parameter to HTTPRequest ?
Hello, I'm trying to send a request, sometimes with parameters, sometimes without. So i pass a json object to the send method. But sometimes data is empty and the request is not sent. Everything works fine on iPhone but not on android. Example : var...
HTTP requests leak memory and cause app or even device to crash
My app sometimes needs to download large amounts of data (100MB+). I can't do it in a single go because Ti's HTTP request is memory-backed. So instead I chunk the file on the server side, download a bunch of files, and stitch them back up. Unfortunately,...
Showing 1-50 of 75 1 2