Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

[0.3.7] .ping returns streaming JSON in the browser #86

Closed
dignifiedquire opened this issue Oct 27, 2015 · 5 comments
Closed

[0.3.7] .ping returns streaming JSON in the browser #86

dignifiedquire opened this issue Oct 27, 2015 · 5 comments

Comments

@dignifiedquire
Copy link
Contributor

Request:

http://127.0.0.1:56191/api/v0/ping?n=1&arg=QmWkMgYviPiHjfCdKkG4mmYotr5zJ

Response:

{
  "Success": false,
  "Time": 0,
  "Text": "PING QmWkMgYviPiHjfCdKkG4mmYotr5zJn3vVpMpYFCaezFQVH."
}{
  "Success": true,
  "Time": 1341453,
  "Text": ""
}{
  "Success": false,
  "Time": 0,
  "Text": "Average latency: 1.34ms"
}
@daviddias
Copy link
Contributor

Does it continue to stream? Or was only 3 pings?

@whyrusleeping thoughts?

@dignifiedquire
Copy link
Contributor Author

That's the whole response for that request (it ends then)

@whyrusleeping
Copy link
Contributor

are the quotes actually included in the response?

On latest master there should be a newline between objects, which makes this easier to parse.
The format is ndjson, we dont want to return an 'array' because parsers will wait until the array is closed before finishing, and we want to act on each object as it arrives.

@dignifiedquire
Copy link
Contributor Author

are the quotes actually included in the response?

No sorry the surrounding quotes are not in the response

@daviddias
Copy link
Contributor

solved with 0.3.9

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

No branches or pull requests

3 participants