Community Questions & Answers
Android Just Won't Party
Running Titanium SDK 3.0.1, minimum Android level, level 8 (2.2 API), targets of iOS and Android on Mac OSX box. I am trying to play some youtube videos that have been retrieved from a channel. Everything plays fine on iOS but getting this annoying error...
setRequestHeader not working on iOS
Here is the issue. I have created an object that handles requests for the REST API of a server. The object has an `initClient` function: ~~~ MarketingServer.initClient = function(loadingView, onError, onLoad) { var self =...
HTTPClient method setRequestHeader sometimes doesn't work
Hello, My question: when I create a HTTPClient, open it and then use the method setRequestHeader some headers are being set correctly and some are not. I use fiddler to monitor the request that is done: Please look at this example code: ~~~ var url =...
How To set multiple RequestHeader for a service call
Hi All, I want to know how to set multiple request header for a API call. for single header we can do like this, ~~~ xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8"); ~~~ what if I have to add custom data to...
Twitter: not sending X-Requested-With header
hi, In most of the API calls which I sent to twitter , I got this [TRACE] I/TiHttpClient( 323): (kroll$3: app://twitter/postTweet.js) [1,90394] Twitter: not sending X-Requested-With header Same functionality works fine but after some time it got stucked...
setRequestHeader doesn't work
Hello *, REQUEST: ~~~ var xhr = Ti.Network.createHTTPClient(); xhr.open('GET', 'http://lab.min.uni-hamburg.de/sturesy/i.php?lecture=elearning'); xhr.setRequestHeader("Content-Type", "application/json;...
Bad request occurred after about 1 day since login
I had developed an app that connect to a server, and get a session for identification. My problem is that, I log in the server, and everything works fine. Then I close the app and open it in the next day morning, suddenly the http request report me...
How to use post data to serversite written in php in titanium for ios ?
I used get method in my current project it working fine but post method is not working bt it work fine in android. I m getting a blank array when i m printing $_POST .Getting confuse and i google a lot for finding perfect solution but non of these...
createHTTPClient's setRequestHeader problem
Hi. I have searched in google and in this forum, but does not found any answer. I want to set custom request header like this : xhr.setRequestHeader("_drl_key2": "1"); but this does not work, when I log in server _drl_key2, it...
User-agent string empty on Android
I've found that the user agent string is empty on Android. A workaround is to set the user agent string manually before making the connection with: ~~~ var androidUserAgent = 'Mozilla/5.0 (Linux; U; ' + Ti.Platform.name + ' ' + Ti.Platform.version + '; '...
Mobileweb HTTP Client setRequestHeader for Session Cookie not working
On my mobileweb project a http client call for the login fails, because the session cookie that is sent after the login into the user interface is not sent for the second and third calls from my api. So the api generates a new session cookie and the user...
Using setRequestHeader with
I cant use setRequestHeader with "If-Modified-Since" to get back at 304 Status. I want to use this for storing images and xml files on the device. And everytime the xml or the image is requested by the application it should check if a newer...
How to retrieve the Requestheader from HTTPClient
I know that I can set header by `setRequestHeader` but how can I retrieve the header data? There is no getRequestHeader. :-(
How do I send this curl query via Appcelerator
I am interacting with a web service in my Titanium Appcelerator Project (with oAuth 2) and I need to make an HTTP POST request. I am successfully making the command with curl like this: ~~~ curl https://api.website.com/oauth/ -i -d...
Problems sending JSON requests using POST
It appears as though the setRequestHeader gets ignored for a HTTPClient which is being used to POST. I have a REST service which consumes and produces application/json. however it doesn't like the requests from Titanium because requests are always sent...
Set COOKIES using setRequestHeader() = CRASHED ?
Hello, I seem to get problems as soon as I have more than one cookie sending through setRequestHeader("Cookie","?????"); Here's my code ~~~ var cookieString = "cookie1=value1; cookie2=value2;"; xhr =...
httpClient, setRequestHeader, Windows
Okay, I've upgraded my desktop application to use the new 1.1.0 API, and so far, so good. I'm only running into one issue. I'm using an httpClient object to connect to a server, authenticate, and then download a file. The server authenticates with a...
How to set cookies and pass cookie off to site
Titanium SDK version: 1.6.2 (04/18/11 17:16 878906d) Titanium Developer Version: 1.2.2 iPhone SDK: 4.3 I am trying to set a cookie and call a page that requires that cookie be set. In the example below I'm setting an event listener that when clicked will...
HTTP POST setRequestHeader(), communication failed!
Hi,following is my code trying to use Web Service,but it seems that the communication failed.Please somebody give me a hand.Thanks! http://pastie.org/1384477 After running the code,'Fail!' is logged as the information.Does it indicate that the...
setRequestHeader and If-Modified-Since doesnt reply a 304 status
I cant use setRequestHeader with "If-Modified-Since" to get back at 304 Status. I want to use this for storing images and xml files on the device. And everytime the xml or the image is requested by the application it should check if a newer...
Iphone xhr.setRequestHeader User Agent Override Error
I was trying to change the User-Agent see the code below... But still the default user-agent is showing in the server log. Please help me to figure out the exact command to send a user define user-agent. 125.xx.xx.12 www.xxx.com - [14/May/2010:12:53:09...
setRequestHeader failing on android
Trying to manually set a cookie on the iphone fails, the following code works perfectly on android but causes problems on iphone: ~~~ var xhr = Titanium.Network.createHTTPClient(); xhr.onload = function() { Ti.API.info('cookie: ' +...
Showing 1-22 of 22