Marco,
We don't use this group for support. It'd be best to move it over to
the Q&A section at
http://developer.appcelerator.com
The status code won't until you call send(). You could then check the
status in your readyStateChange handler.
On Jul 26, 10:57 am, Marco Schierhorn
<
marco.schierh...@googlemail.com> wrote:
> 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 version is found on the server.
> Im sending the date "Mon, 19 Jul 2010 11:20:22 GMT"
> And im receiving the date "Mon, 19 Jul 2010 10:20:17 GMT" from the server.
> Usually it should work and return a 304 status.
>
> if (Titanium.Network.online)
> {
> var c= Titanium.Network.createHTTPClient();
> if (c.status == 304)
> {
> // XML File not necessary - Clientlog File is newer
> console.log('Use Client XML File - is newer than the server XML');
> fn_end(file_obj);
> return;
> }
> // ...here will follow some code to store the files on the device
>