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

show(HTTP.Response) blocks forever #85

Closed
samoconnor opened this issue Aug 30, 2017 · 0 comments
Closed

show(HTTP.Response) blocks forever #85

samoconnor opened this issue Aug 30, 2017 · 0 comments

Comments

@samoconnor
Copy link
Contributor

I have a server that streams forever.

If I try to get with stream=true form the REPL, the REPL tries to do show(HTTP.Response) and that blocks forever...

julia> r = HTTP.get("http://127.0.0.1:8000"; stream = true)
HTTP.Response:
"""
HTTP/1.1 200 OK
Connection: keep-alive
Transfer-Encoding: chunked
Cache-Control: no-cache
Content-Type: text/event-stream
Date: Wed, 30 Aug 2017 00:17:46 GMT
<waits forever!!>

The same thing happens when I use @show from a source file:

r = HTTP.get("http://127.0.0.1:8000"; stream = true)
@show typeof(r)
@show r

for l in eachline(HTTP.body(r))
    println(l)
end
typeof(r) = HTTP.Response
<waits forever!!>
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