Pittsburgh-NEH-Institute / pr-app

eXist-db app development
MIT License
3 stars 1 forks source link

API for reading? #16

Closed djbpitt closed 2 years ago

djbpitt commented 2 years ago

Your to-do

@djbpitt and @gabikeane should explore whether we want the API for reading to look like:

_http://localhost:8080/exist/apps/pr-app/read?title=hammersmithghost_times_1804_ (this is the current approach)

or

_http://localhost:8080/exist/apps/pr-app/read/hammersmithghost_times_1804_

Both are view-first. The former treats the title as a query parameter; the latter treats it as part of the URL. The second version is simpler and more user-friendly, since it removes the question mark, parameter name, and equal sign.

Issues you may encounter

Part of a broader decision about the API structure. We might prefer the second approach if there is always only one query parameter and the first if there can be multiple parameters.

Additional context

None