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

ndjson problems #1978

Closed
dignifiedquire opened this issue Nov 19, 2015 · 5 comments
Closed

ndjson problems #1978

dignifiedquire opened this issue Nov 19, 2015 · 5 comments

Comments

@dignifiedquire
Copy link
Member

Currently

/api/v0/dht/findprovs?arg=<hash>&stream-channels=true

returns something that looks like ndjson but is not: https://gist.github.com/Dignifiedquire/93d2b01c638f08a77f68. According to the spec every line has to be a valid json object.

Ref ipfs-inactive/js-ipfs-http-client#76

@jbenet
Copy link
Member

jbenet commented Nov 19, 2015

this stuff is very important we need serious API tests here.

@dignifiedquire
Copy link
Member Author

F****. I'm so sorry, this is a bug in the request library I'm using and not in go ipfs. The headers are set to chunked output and it's not detecting them properly. So sorry about this 😊

@whyrusleeping
Copy link
Member

very important

https://www.youtube.com/watch?v=Hzx8KHjQD6c

@jbenet
Copy link
Member

jbenet commented Nov 19, 2015

@dignifiedquire so it does return proper ndjson output?

@dignifiedquire
Copy link
Member Author

@jbenet It returns proper chunked output, for why it's causing issues see: ipfs-inactive/js-ipfs-http-client#76 (comment)

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

3 participants