Skip to content

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

Open

Description

@hannahhoward

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

Activity

  1. MarcoPolo commented on Oct 1, 2024

    @MarcoPolo
    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.

  2. hannahhoward commented on Oct 3, 2024

    @hannahhoward
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions