Implements the OAI-PMH protocol at the '/oai' endpoint. #53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implements the OAI-PMH protocol at the '/oai' endpoint. The endpoint supports both 'GET' and 'POST' requests according to the specification. All responses should return XML documents that validate against the OAI_PMH schema
Supports the following verbs:
Tests:
100% test coverage, check out
test/integration/oai.test.js
to see all the error case handling required by the OAI-PMH specificationSteps to test
For "list requests" (e.g.
ListRecords
):verb
andmetadataPrefix
parameters:http://localhost:3000/oai?verb=ListRecords&metadataPrefix=oai_dc
resumptionToken
returned in the previous request:http://localhost:3000/oai?verb=ListRecords&metadataPrefix=oai_dc&resumptionToken=FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFm1jN3ZCajdnUURpbUhad1hIYnNsQmcAAAAAAAB2DhZXbmtMZVF5Q1JsMi1ScGRsYUlHLUtB
resumptionToken
elementresumptionToken
you should get an error response withbadResumptionToken
For all other verbs, pass in the verb and any required parameters using either
POST
orGET
requests:curl http://localhost:3000/oai?verb=GetRecord&identifier=c02c149f-1df1-4252-ae93-79031c676e71&metadataPrefix=oai_dc
curl -X POST 'http://localhost:3000/oai' --data 'verb=Identify'