{ "id": "113420", "key": "TIMOB-13691", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "2013-04-26T08:42:07.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:21.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": "12305", "name": "Core", "description": "Central component of the Platform (outside of Tooling, or platform specific implementation details)" } ], "description": "When i using *Ti.Network.createHTTPClient* to create a *HTTPClient*, i wanna display upload progress on my app, the *ondatastream* event was bound like below:\r\n{code:javascript}\r\nvar xhr = Ti.Network.createHTTPClient();\r\nxhr.ondatastream = function(e){\r\n // progressing...\r\n};\r\n{code}\r\nbut *ondatastream* event was never ever fired, i was confused by this condition, WTF... \r\n\r\nfinally, the solution is that you should only bind *ondatastream* like these:\r\n{code:javascript}\r\nvar xhr = Ti.Network.createHTTPClient({\r\n ondatastream: function(e){ ... }\r\n});\r\n{code}\r\nthat's really ridiculous, i guess your guys forgot to implement the prototype of *ondatastream* for HTTPClient(or something else like getter and setter of property *ondatastream*). can you fix it? we really wanna use it like:\r\n{code:javascript}\r\nvar xhr = Ti.Network.createHTTPClient();\r\nxhr.ondatastream = function(e){\r\n // progressing...\r\n};\r\n{code}\r\n{color:red}but not:{color}\r\n{code:javascript}\r\nvar xhr = Ti.Network.createHTTPClient({\r\n ondatastream: function(e){ ... }\r\n});\r\n{code}\r\n\r\nregards && thx.", "attachment": [], "flagged": false, "summary": "TiAPI: Ti.Network.HTTPClient ondatastream prototype doesn't fire", "creator": { "name": "tjatse", "key": "tjatse", "displayName": "Xiong Jun", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tjatse", "key": "tjatse", "displayName": "Xiong Jun", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 3.1.0GA, MacBook Pro Moutain Lion 10.8.3", "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }