We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Consider this more a use case than a problem (as it is outside of scramjet).
scramjet
Let's consider code:
StringStream.from(request(someUrl)) .lines() .parse(JSON.parse) .until(x => x.date < Date.now())
What we do is unpipe the response, but that is not closed by request so how do we handle this?
request
Mention: openaq-fetch#547
The text was updated successfully, but these errors were encountered:
The current solution has been deployed to OpenAQ adapters.
const requestObject = request.get(stationUrl); return DataStream return DataStream .from(() => request.get(stationUrl).pipe(JSONStream('*'))) .pipeline( requestObject, JSONStream('*') ) .catch(e => { requestObject.abort(); e.stream.end(); throw e; })
Should it and can it be any cleaner - the abort operation is specific to request module...
abort
Sorry, something went wrong.
After giving this some thought it seems that the current solution is good enough.
No branches or pull requests
Consider this more a use case than a problem (as it is outside of
scramjet
).Let's consider code:
What we do is unpipe the response, but that is not closed by
request
so how do we handle this?Mention: openaq-fetch#547
The text was updated successfully, but these errors were encountered: