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

ipfs.config.get() returns different value types #822

Closed
hacdias opened this issue Jul 31, 2018 · 3 comments · Fixed by #825
Closed

ipfs.config.get() returns different value types #822

hacdias opened this issue Jul 31, 2018 · 3 comments · Fixed by #825

Comments

@hacdias
Copy link
Contributor

hacdias commented Jul 31, 2018

If the API is connected to a Go node, calling ipfs.config.get() returns a Uint8Array.

If the API is connected to a JS node, calling ipfs.config.get() returns, well, an object with the config.

Interface IPFS Core says "[the result] is a JSON object containing the configuration of the IPFS node" which is also confusing to me.

Should we normalize it to a simple object everywhere?

@hacdias hacdias changed the title ipfs.config.get() returns different values ipfs.config.get() returns different value types Jul 31, 2018
@hacdias
Copy link
Contributor Author

hacdias commented Aug 2, 2018

/cc @diasdavid

@hacdias
Copy link
Contributor Author

hacdias commented Aug 2, 2018

This happens because JS-IPFS sets the Content-Type header to application/json and GO-IPFS to text/plain.

@hacdias
Copy link
Contributor Author

hacdias commented Aug 3, 2018

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

Successfully merging a pull request may close this issue.

2 participants