-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doing something wrong? oboe not reacting to streaming data #34
Comments
It looks like you are using it right. Your assumptions are correct - Oboe doesn't care about object/array etc ('*' should match either type). Newlines, so long as the JSON remains valid, should be ignored. That you are using CORS shouldn't have any impact either, at least in Chrome. All I can think of right now: is your stream gzipped? Perhaps the deflate compressor is holding back transmitting until it gets a certain size of buffer filled. Under Node.js/zlib you can set it to flush like this:
The integration tests for streamability with CORS are passing against Chrome so I don't think there is a bug in the library. |
How big is the response? Could you set up a testcase somewhere? |
Since no feedback was provided for several months this issue should be closed (can be reopened as soon as feedback is available @tomorgan) |
I have this JS on my page:
oboe(requestUri)
.node('*', function( Thing ){
alert('data!');
})
.fail(function() {
alert('problems');
});
});
The requestUri returns an open connection (which never closes) and sends JSON. Here's an example of what it would send:
[{"Attribute":"att1","ID":"test1@test.com","Value":"value1"},{"Attribute":"att2","ID":"test2@test.com","Value":"value2\r\n"}]
It'll send a series of these, as things change. Each time it sends a [ ] containing 1 or more { } (the example shows 2), followed by a line break. Is all that OK for Oboe?
(The \r\n is in the data I'm using - I just noticed it but don't think it would cause a problem?)
I'm using Chrome. Using Dev Tools and Fiddler, I see the initial OPTIONS call (in fact, I had to code the response for it as I didn't have one!), then the GET being made. The data is returned (I've tested using a console app), but Oboe doesn't show anything. No errors in Console window...just nothing.
Am I wrong in trying to use Oboe for streaming HTTP data, or have I missed something?
Thanks for any help here :)
-tom
The text was updated successfully, but these errors were encountered: