From 1adaf282b1df5a4c0eb76d8c7548db75c5763c10 Mon Sep 17 00:00:00 2001 From: Marco Munizaga Date: Mon, 15 Apr 2024 09:38:04 -0700 Subject: [PATCH] Rename to http-path --- protocols/httppath.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/protocols/httppath.md b/protocols/httppath.md index 1f04b1d..433596b 100644 --- a/protocols/httppath.md +++ b/protocols/httppath.md @@ -1,4 +1,4 @@ -# `httppath` +# `http-path` This protocol encodes an HTTP Path to a resource. In the string representation, the path is encoded in a way consistent with a single URI Path segment per [RFC 3986 Section @@ -13,25 +13,25 @@ representation to avoid ambiguities over which characters were escaped. The following is a table of examples converting some common HTTP paths to their Multiaddr string form. -| HTTP Path | Multiaddr string form | -| --------------- | -------------------------------- | -| / | n/a. This is implied. | -| /user | `/httppath/user` | -| /api/v0/login | `/httppath/api%2Fv0%2Flogin` | -| /tmp/foo/../bar | `/httppath/tmp%2Ffoo%2F..%2Fbar` | -| a%20space | `/httppath/a%2520space` | -| a%2Fslash | `/httppath/a%252Fslash` | +| HTTP Path | Multiaddr string form | +| --------------- | --------------------------------- | +| / | n/a. This is implied. | +| /user | `/http-path/user` | +| /api/v0/login | `/http-path/api%2Fv0%2Flogin` | +| /tmp/foo/../bar | `/http-path/tmp%2Ffoo%2F..%2Fbar` | +| a%20space | `/http-path/a%2520space` | +| a%2Fslash | `/http-path/a%252Fslash` | ## Usage -`/httppath` should be appended to the end of an existing multiaddr, including after the peer id component (p2p). As an example, here's a multiaddr referencing the `.well-known/libp2p` HTTP resource along with a way to reach that peer: +`/http-path` should be appended to the end of an existing multiaddr, including after the peer id component (p2p). As an example, here's a multiaddr referencing the `.well-known/libp2p` HTTP resource along with a way to reach that peer: ``` -/ip4/1.2.3.4/tcp/443/tls/http/p2p/12D.../httppath/.well-known%2Flibp2p +/ip4/1.2.3.4/tcp/443/tls/http/p2p/12D.../http-path/.well-known%2Flibp2p ``` -The `/httppath` component can also be appended to just the `/p2p/...` component, and rely on a separate peer discovery mechanism to actually identify the peer's address: +The `/http-path` component can also be appended to just the `/p2p/...` component, and rely on a separate peer discovery mechanism to actually identify the peer's address: ``` -/p2p/12D.../httppath/.well-known%2Flibp2p +/p2p/12D.../http-path/.well-known%2Flibp2p ```