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

Switch to request with Accept: application/vnd.ipld.car #12

Closed
lidel opened this issue Jun 13, 2022 · 2 comments · Fixed by #13
Closed

Switch to request with Accept: application/vnd.ipld.car #12

lidel opened this issue Jun 13, 2022 · 2 comments · Fixed by #13

Comments

@lidel
Copy link

lidel commented Jun 13, 2022

Just so we don't forget, https://github.com/ipfs/go-ipfs/releases/tag/v0.13.0#support-for-block-and-car-response-formats makes below possible:

$ curl  -H 'Accept: application/vnd.ipld.car' "http://127.0.0.1:8080/ipfs/bafybeiednzu62vskme5wpoj4bjjikeg3xovfpp4t7vxk5ty2jxdi4mv4bu" --output webui.car
$ ipfs dag import webui.car
@olizilla
Copy link
Owner

can i go for the ?format=car query flavour instead?

@lidel
Copy link
Author

lidel commented Jun 14, 2022

Yes, both ways are part of the spec and will work in go-ipfs 0.13+, I don't have a strong preference :)

My working argument for choosing header: it is less ambiguous to use explicit Accept: application/vnd.ipld.car in clients. Allows drive-by readers of your client code to google and find https://www.iana.org/assignments/media-types/application/vnd.ipld.car and learn about things that way.

2color added a commit to 2color/ipfs-get that referenced this issue Jan 6, 2023
@2color 2color closed this as completed in #13 Jan 8, 2023
2color added a commit that referenced this issue Jan 8, 2023
* Fix bug and use the public gateway car response

Fixes #12

* Upgrade ipld/car dep

* Update test matrix to node 16 and 18

Co-authored-by: Daniel N <2color@users.noreply.github.com>
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

Successfully merging a pull request may close this issue.

2 participants