Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-13691

TiAPI: Ti.Network.HTTPClient ondatastream prototype doesn't fire

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: Release 3.1.0
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
    • Environment:

      Titanium SDK 3.1.0GA, MacBook Pro Moutain Lion 10.8.3

      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:

      var xhr = Ti.Network.createHTTPClient();
      xhr.ondatastream = function(e){
          // progressing...
      };
      

      but ondatastream event was never ever fired, i was confused by this condition, WTF...

      finally, the solution is that you should only bind ondatastream like these:

      var xhr = Ti.Network.createHTTPClient({
          ondatastream: function(e){ ... }
      });
      

      that'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:

      var xhr = Ti.Network.createHTTPClient();
      xhr.ondatastream = function(e){
          // progressing...
      };
      

      but not:

      var xhr = Ti.Network.createHTTPClient({
          ondatastream: function(e){ ... }
      });
      

      regards && thx.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tjatse Xiong Jun
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration