-
Notifications
You must be signed in to change notification settings - Fork 39
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
Create a new endpoint to return a matched CDXJ record #473
Comments
@ibnesayeed This seems like the goal you described for server-less replay it would make achieving #434 even more difficult. Please comment on this, as I am motivated of integrating Prefer support as is relevant to my (our) research. |
No, the two are independent things. We can continue implementing support for |
@ibnesayeed Do you think the CDXJ meta headers should be included in the response? I am working on an implementation that leverages our currently existing functionality and want to be sure I route through the right functions so as to not have to duplicate functionality. |
We can think about that later when we start consuming the response. We might just create a JSON object that has all the necessary bits from the matched record and any other necessary metadata in it. |
Per our verbal discussion, please outline how you expect this JSON object to look, e.g., including all the Memento-esque relations. Just an example ought to get us moving in the right direction to make this endpoint more useable for the replay banner. |
@ibnesayeed Please document here the alternative Prefer semantics you described to me verbally in lieu of having a CDXJ endpoint. |
I think we are looking for something like this:
|
While |
We need a new endpoint to return an index record instead of a reconstructed memento. This will enable us to try fetching IPFS blocks directly from the SW and reconstruct the memento there instead of letting the server do this. This will be a step in the direction of server-free decentralized replay. This will eliminate the need of threading as we can leverage asynchronous nature of JS for concurrent fetches. Additionally, we can avoid the location header rewriting issue (as per #456 and #461) by reusing the logic already present in Reconstructive.
/cdxj/:datetime/:urir
should return 404 if no record is found, but return 200 (not a 3xx) otherwise with the one entry extracted from the index. We can either returnapplication/cdxj+ors
content type orapplication/json
if we transform the index record into JSON.The text was updated successfully, but these errors were encountered: