Skip to content
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

ctx.readAsJson() error "Bad state: Stream has already been listened to." #26

Open
vvnab opened this issue Apr 23, 2015 · 0 comments
Open

Comments

@vvnab
Copy link

vvnab commented Apr 23, 2015

app.post("/todos", (HttpContext ctx){
ctx.readAsJson().then((x){
ctx.sendJson(x);
});
})

don`t work
trow error
"""
Bad state: Stream has already been listened to.

StackTrace:
#0 _StreamController._subscribe (dart:async/stream_controller.dart:601)
#1 _ControllerStream._createSubscription (dart:async/stream_controller.dart:790)
#2 _StreamImpl.listen (dart:async/stream_impl.dart:474)
#3 _ForwardingStreamSubscription._ForwardingStreamSubscription (dart:async/stream_pipe.dart:129)
#4 _ForwardingStream._createSubscription (dart:async/stream_pipe.dart:96)
#5 _ForwardingStream.listen (dart:async/stream_pipe.dart:88)
#6 _HttpIncoming.listen (dart:io/http_impl.dart:47)
#7 _HttpRequest.listen (dart:io/http_impl.dart:119)
#8 _SinkTransformerStreamSubscription._SinkTransformerStreamSubscription (dart:async/stream_transformers.dart:46)
#9 _BoundSinkStream.listen (dart:async/stream_transformers.dart:186)
#10 _HttpContext.readAsText (package:express/_http_context.dart:85:14)
#11 _HttpContext.readAsJson (package:express/_http_context.dart:95:17)
#12 main.

"""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant