{ "id": "150922", "key": "TIMOB-19458", "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": [], "resolution": null, "resolutiondate": null, "created": "2015-09-02T16:33:49.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:55:16.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h6.Issue Description\r\nRunning the sample code below, we're trying to set a very high timeout for our HttpClient request. (It's a necessary change for our test environment.) Unfortunately, our increase seems to be ignored, and the connection always times out after 120 seconds. \r\n\r\nh6.Runnable Test Case \r\nThe variable ‘someurl’ can be replaced with the url of a slow responding API (an API which takes longer to respond). \r\n{code}\r\nvar makeRestAPICall = function() {\r\n // create the titanium HTTPClient\r\n var httpClient = Titanium.Network.createHTTPClient();\r\n\r\n //var someurl = \"http://jsonplaceholder.typicode.com/posts/\";\r\n var someurl = \"http://fake-response.appspot.com/?sleep=3000\"\r\n httpClient.setTimeout(300000);\r\n\r\n /**\r\n * httpClient error handler\r\n * @method onerror\r\n * @param {} e\r\n * @return\r\n */\r\n httpClient.onerror = function(e) {\r\n Ti.API.info(\"API ERROR \", e.error);\r\n };\r\n\r\n /**\r\n * httpClient Success Handler if and when response comes back the success function is called\r\n * @method onload\r\n * @return\r\n */\r\n httpClient.onload = function(e) {\r\n Ti.API.info(\"On load \" + e);\r\n };\r\n\r\n // open the connection and set the appropriate request headers\r\n httpClient.open(\"POST\", someurl, true);\r\n httpClient.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\");\r\n\r\n // send the request\r\n httpClient.send(\"\");\r\n};\r\n\r\nmakeRestAPICall();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Timeout property of Ti.Network.HttpClient is being ignored", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 4.1.0.GA\r\niOS 8", "comment": { "comments": [ { "id": "364067", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "the setTimeout doesn't seem to work for me either.", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-09-16T10:23:09.000+0000", "updated": "2015-09-16T10:23:09.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }