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.
issue #53
enables rest interaction with xqerl db collections and XDM items
Uses cowboy rest handler in conjunction with xQuery main modules,
to allow CRUD ops on xqerl database collections and items.
checks: Curl is used to to check correct responses to HTTP requests
https://github.com/grantmacken/xqerl/runs/5169676947?check_suite_focus=true
Content negotiation
GET and HEAD request can return different resource representations depending on Accept Header
example: retrieving a list of collection items
HEAD request can be used to check for db collection or resource item availability.
HEAD request provides content-length header so you can determine resource size
DELETE requests only are available for items not collections as
deleting collections looks a bit dangerous but I can try to enable if requested
POSTS when posting requests MUST use a content-type header
at the moment only XML or JSON data types are accepted.
If there is a SLUG header then that will be used as the item name
otherwise the item name is generated as a uuid
The POST 'content-type' XML or JSON limitation is not set in stone and can be extended later.
e.g. when posting CSV, this can be stored as XDM array item.
then you might want to retrieve the resource using an Accept Header as text, JSON array or XML