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

http: document how to reference http resources #554

Open
p-shahi opened this issue Jun 21, 2023 · 3 comments
Open

http: document how to reference http resources #554

p-shahi opened this issue Jun 21, 2023 · 3 comments

Comments

@p-shahi
Copy link
Member

p-shahi commented Jun 21, 2023

Paraphrasing @MarcoPolo "HTTP semantics can run on top of any transport. So these need to be able to be defined on top of any multiaddr not just ones that end in /http" (as documented in #550)

@MarcoPolo
Copy link
Contributor

Context for this issue is that Juan asked that we define a way to reference HTTP resources in multiaddrs sooner rather than later because:

  • As soon as we introduce HTTP semantics to libp2p folks will want to reference HTTP resources in multiaddrs.
  • HTTP resources can be defined outside of a specific protocol, so it's not enough to prefix them with a custom multicodec (as suggested in Document /http #550).

This introduces a new way of using Multiaddrs that we haven't seen much in practice (With the exception of IPNI's use of a custom multicodec httpath ipni/go-libipni#42). Multiaddrs have primarily been used as a way of describing how to reach a peer. With this, multiaddrs will describe how to reach a resource.

Prior discussion:
multiformats/multicodec#324
ipni/go-libipni#42

@MarcoPolo
Copy link
Contributor

My current thinking is that /httpath (or /httppath, my preference) is a reasonable solution to this. This can be appended to any transport and defines where an HTTP resource exists and the transport used to address the peer that has this resource. More details here: ipni/go-libipni#42 (comment)

@MarcoPolo
Copy link
Contributor

PR here: multiformats/multiaddr#164

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

No branches or pull requests

3 participants