{ "id": "63910", "key": "TIMOB-3278", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "11246", "name": "Sprint 2011-11", "archived": true, "released": true, "releaseDate": "2011-03-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-05-17T16:35:57.000+0000", "created": "2011-04-15T03:41:11.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "ios", "release-1.7.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "jacobrelkin", "key": "jacobrelkin", "displayName": "Jacob Relkin", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-05-17T16:35:57.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

Client code needs to be able to specify timeouts for HTTP\nRequests.

{html}", "attachment": [], "flagged": false, "summary": "HTTP Request Timeout", "creator": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "130461", "author": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "body": "{html}

Doesn't this work for you?

\n
\n\nvar xhr = Titanium.Network.createHTTPClient();\nxhr.timeout = 1000000;\n\nxhr.onerror = function(e){\n    Ti.API.info('IN ERROR ' + e.error);\n};\nxhr.onload = function(){\n\n    Ti.API.info(this.responseText);\n};\nxhr.open('POST','http://some.url');\n\nxhr.send();\n
\n

Seems to be ok for me (1.7.0 and has been for a long time since\n1.4ish)

\n

Given that it needs to be set before open() and send()

\n

Note use of xhr.timeout = xxxx rather than\nxhr.setTimout(xxxx)

{html}", "updateAuthor": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "created": "2011-04-15T03:41:11.000+0000", "updated": "2011-04-15T03:41:11.000+0000" }, { "id": "130462", "author": { "name": "jacobrelkin", "key": "jacobrelkin", "displayName": "Jacob Relkin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

@kosso,

\n

Does this work on iOS?

{html}", "updateAuthor": { "name": "jacobrelkin", "key": "jacobrelkin", "displayName": "Jacob Relkin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:41:12.000+0000", "updated": "2011-04-15T03:41:12.000+0000" }, { "id": "133851", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is represented in KitchenSink at Platform>XHR>setTimeout. Verified functioning as expected with SDK 1.7.0RC1 on iPhone 4 4.2.6 and android devices. Code example is:\nvar xhr = Ti.Network.createHTTPClient();\nxhr.setTimeout(30000);\n\nClosing.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-17T16:35:57.000+0000", "updated": "2011-05-17T16:35:57.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }