url | test | status |
---|---|---|
/resources | pass | 200 |
/resources/ | fail | 405 |
/resources?query=a | pass | 200 |
/resources/?query=a | fail | 405 |
/resources/a | pass | 200 |
/resources/d | pass | 404 |
- Are query-parameters implicitly cast to the type specified in the handler (xs:integer, array())?
How does one get the list of registered endpoints? The documented functionrest:resource-functions()
does not seem to work.- Which registered function wins when in one db instance multiple modules register '/resource'. Do the specificity rules apply?
Enable error handlers by annotation (see routes:detail and routes:not-found).
Improve logging/tooling: it is sometimes hard to know if a handler was registered and if not why.
Having to juggle all n parameters is cumbersome when output can happen in multiple formats. Generally I do prefer one map passed to the handler with all interesting (processed) request data
$request := map {
'parameters': map { 'id': ... }
'query-parameters': map { 'query': ..., }
'headers': map { 'e-tag': ..., 'If-None-Match': ..., ... }
}