{ "id": "60727", "key": "TIMOB-95", "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": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:51:58.000+0000", "created": "2011-04-15T02:23:35.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "xhr" ], "versions": [], "issuelinks": [], "assignee": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:51:58.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}

To make it seamless to support libraries such as jQuery,\nMootools, YUI, etc that have their own AJAX convenience methods, we\nneed to patch XMLHttpRequest to use\nTitanium.Network.createHttpClient

\n

such as:

\n
\n\nwindow.XMLHttpRequest = function() {\n    return new Titanium.Network.createHTTPClient()\n};\n
\n

test case w/ jquery:

\n
\n\n$.getJSON(\"http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?\",\n                function(data)\n{\n         $.each(data.items, function(i,item){\n        $(\"<img/>\").attr(\"src\", item.media.m).appendTo(\"#log\");         \n            if ( i == 3 ) return false;\n        });\n});\n
\n

(make sure you create a div with id log in HTML)

{html}", "attachment": [], "flagged": false, "summary": "Override built-in XMLHttpRequest to use Titanium.Network", "creator": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "122750", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [e17973888aeeb96107d4885609ba3f413c1db21d])\n[#95\nstate:resolved] monkey patch XMLHttpRequest to use built-in\nTitanium.Network \nhttp://github.com/appcelerator/titanium_mobile/commit/e17973888aeeb...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:23:36.000+0000", "updated": "2011-04-15T02:23:36.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }