tessel / t1-runtime

[UNMAINTAINED] Tessel 1 JavaScript runtime.
Other
117 stars 33 forks source link

Passing in buffer data to http parser #646

Closed jiahuang closed 10 years ago

jiahuang commented 10 years ago

Fixes Keen.io again. Or anything that sends binary data over http.

Test case is this:

var Keen = require('keen.io');

var keen = Keen.configure({
    projectId: "53fd0676e861701e17000001",
    writeKey: "510a87bcaca6d22103d47cb364520700218e44e2c99542331baf91e2988e143a1b891561838af27a9e4466b8834939c14547402f610a1e9075448740e97fc8b82918da10f409ffbab761eb6e394cccb7db133ba935d22a1189d1f91d70eed76b8f05b16133c91417da5438b15d4327f7",
    readKey: "e59871426c869471154eeebdf6e7feb02309f6d0d12574cd655fa8187d0dec5c16922b8a72364c3f192a5459e4debace4b70594fa8cd69e2af1f3b1c9d17d689677d20c806e7a690213122e8f022f496ee10c918013a07e246b3ae5247b66dc27167ee479f1d209c9f2aec115a5830a6"
});

var count = 0;
setImmediate(function sendToCloud(){
    keen.addEvent("tessel-climate", {
       "temp": 12345
     }, function (err, res){
        if (err){
            console.log("err occured", err);
        }
        console.log("res", res);
        count++;
        console.log("added event", count);
        setTimeout(sendToCloud, 1);
     });
});
tcr commented 10 years ago

lgtm after that fix

tm-rampart commented 10 years ago

Approved by @jiahuang. Running tests.

tm-rampart commented 10 years ago

Merge or tests failed.

tm-rampart commented 10 years ago

Approved by @tcr. Running tests.

tm-rampart commented 10 years ago

Merge or tests failed.

tm-rampart commented 10 years ago

Approved by @jiahuang. Running tests.