You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/routing/http-routing-v1.md
+17-1
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,13 @@ This API uses a standard version prefix in the path, such as `/v1/...`. If a bac
71
71
-`404` (Not Found): must be returned if no matching records are found.
72
72
-`422` (Unprocessable Entity): request does not conform to schema or semantic constraints.
73
73
74
+
#### Response Headers
75
+
76
+
-`Content-Type`: the content type of this response, which MUST be `application/json` or `application/x-ndjson` (see [streaming](#streaming)).
77
+
-`Last-Modified`: the timestamp of the resolution.
78
+
-`Cache-Control: public, max-age={TTL}`: cache TTL returned with the response. When present, it SHOULD be short for responses that do whose resolution ended in no results (e.g. 15 seconds), and CAN be longer for responses that have results (e.g. 5 minutes).
79
+
-`Vary: Accept`: allows intermediate caches to play nicely with the different possible content types.
80
+
74
81
#### Response Body
75
82
76
83
```json
@@ -108,6 +115,13 @@ represented as a CIDv1 encoded with `libp2p-key` codec.
108
115
-`404` (Not Found): must be returned if no matching records are found.
109
116
-`422` (Unprocessable Entity): request does not conform to schema or semantic constraints.
110
117
118
+
#### Response Headers
119
+
120
+
-`Content-Type`: the content type of this response, which MUST be `application/json` or `application/x-ndjson` (see [streaming](#streaming)).
121
+
-`Last-Modified`: the timestamp of the resolution.
122
+
-`Cache-Control: public, max-age={TTL}`: cache TTL returned with the response. When present, it SHOULD be short for responses that do whose resolution ended in no results (e.g. 15 seconds), and CAN be longer for responses that have results (e.g. 5 minutes).
123
+
-`Vary: Accept`: allows intermediate caches to play nicely with the different possible content types.
124
+
111
125
#### Response Body
112
126
113
127
```json
@@ -148,7 +162,9 @@ Each object in the `Peers` list is a record conforming to the [Peer Schema](#pee
148
162
#### Response Headers
149
163
150
164
-`Etag`: a globally unique opaque string used for HTTP caching. MUST be derived from the protobuf record returned in the body.
151
-
-`Cache-Control: max-age={TTL}`: cache TTL returned with :ref[IPNS Record] that has `IpnsEntry.data[TTL] > 0`. When present, SHOULD match the TTL value from the record. When record was not found (HTTP 404) or has no TTL (value is `0`), implementation SHOULD default to `max-age=60`.
165
+
-`Cache-Control: public, max-age={TTL}`: cache TTL returned with :ref[IPNS Record] that has `IpnsEntry.data[TTL] > 0`. When present, SHOULD match the TTL value from the record. When record was not found (HTTP 404) or has no TTL (value is `0`), implementation SHOULD default to `max-age=60`. Implementations CAN also include other derivatives, such as `stale-while-revalidate` and `stale-if-error`.
166
+
-`Expires: {SIGNATURE_EXPIRATION}`: header with time when the signature expires.
167
+
-`Last-Modified`: with the timestamp of the resolution.
0 commit comments