{ "id": "81454", "key": "AC-2745", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2011-10-13T12:44:01.000+0000", "created": "2011-10-12T11:26:59.000+0000", "labels": [ "HTML5", "Mobile" ], "versions": [], "issuelinks": [], "assignee": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "updated": "2016-03-08T07:47:38.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Perhaps this is an issue with the server side, but from my understanding you're supposed to be using \"GET\" and not \"POST\" when requesting a script file. Ti.include (Ti.js ln 43) calls _loadSyncScript, which does an XHR call using \"POST\", which causes the call to fail and the script not returned.\r\n\r\nThe working code:\r\n{code}\r\nfunction _loadSyncScript(_location) {\r\n\tif ('undefined' != typeof _loadedScripts[_location]) {\r\n\t\treturn _execScript(_loadedScripts[_location]);\r\n\t}\r\n\tvar _xhr = new XMLHttpRequest(); \r\n\t_xhr.onreadystatechange = function() {\r\n\t\tif (_xhr.readyState == 4) {\r\n\t\t\tif (_xhr.status == 200) {\r\n\t\t\t\t_loadedScripts[_location] = _xhr.responseText;\r\n\t\t\t\t_execScript(_xhr.responseText);\r\n\t\t\t} \r\n\t\t}\r\n\t};\r\n\t_xhr.open(\"GET\",_location,false);\r\n\t_xhr.setRequestHeader(\"Access-Control-Allow-Origin\",\"*\");\r\n\t_xhr.setRequestHeader(\"Content-Type\", \"text/xml; charset=utf-8\");\r\n\t_xhr.send(null);\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "Ti.Include returns 500 because it uses \"POST\" not \"GET\"", "creator": { "name": "ghaladen", "key": "ghaladen", "displayName": "Christopher Spence", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ghaladen", "key": "ghaladen", "displayName": "Christopher Spence", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Windows 7", "comment": { "comments": [ { "id": "169117", "author": { "name": "ghaladen", "key": "ghaladen", "displayName": "Christopher Spence", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Also on a side note, I would imagine the content-type should be set to \"application/javascript\" when retrieving a script, but I left it as \"text/xml\" since the code is now working even with \"text/xml\" in place.", "updateAuthor": { "name": "ghaladen", "key": "ghaladen", "displayName": "Christopher Spence", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-13T06:48:33.000+0000", "updated": "2011-10-13T06:48:33.000+0000" }, { "id": "169214", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "I am sorry, Christopher, but we do not support software until its official release. That said, this part of the product is being rewritten, so it should be resolved by the next version.\r\n\r\nThanks for your input.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-10-13T12:44:01.000+0000", "updated": "2011-10-13T12:44:01.000+0000" }, { "id": "177248", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Ticket resolved and not updated since last curator action.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-27T06:40:49.000+0000", "updated": "2011-12-27T06:40:49.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }