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

How to follow recommendations for including HTTP semantics using go-multiaddr #254

Open
hannahhoward opened this issue Sep 27, 2024 · 2 comments

Comments

@hannahhoward
Copy link

Question:

In https://github.com/libp2p/specs/blob/master/http/transport-component.md#recommendation-on-including-http-semantics-in-multiaddrs there's a recommendation to use the private use area of multicodecs to add HTTP semantics to an HTTP multiaddr.

However, my read is that this implementation would, by default, error trying to encode/decode such multiaddrs as the protocols would not be part of the protocol table.

Is the recommendation to call AddProtocols on every machine your application runs on an add your additional protocol?

Also is this still the recommendation given http-path was later added as a default included protocol?

cc: @MarcoPolo

@MarcoPolo
Copy link
Contributor

Thanks for linking that. I should update that documentation to remove the references to http-path since we do, in fact, have that.

Here's some context on why I changed my mind around http-path: ipni/go-libipni#42 (comment).

Do you need anything else besides the path? I don't think it makes sense to encode the method type or parameters since this is just talking about a specific resources. If you need to encode those I think the linked recommendation is still good. You would call AddProtocols as part of your application, and that runs everywhere your application does.

@hannahhoward
Copy link
Author

this describes what we're trying to do: ipni/go-libipni#230

TLDR: http-path will work, but it's probably somewhat abusing the concept for an unintended purpose.

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

2 participants