You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we have the http. namespace to handle requests, is there any benefit in maintaining the rest get() and post() functions?
Instead of get('patient/d3f7e1a8-0114-4de6-914b-41a11fc8a1a8'), you can just do http.get("/ws/rest/v1/patient/d3f7e1a8-0114-4de6-914b-41a11fc8a1a8")`. Not a big deal.
You can use create and search to fetch and create resources. This should be cleaner and easier than using the rest API.
We could also consider getById(resource, ...id) or getResource which takes a resource and one or more ids. this is basically how get works today - I just want to use a different verb to decouple from the HTTP id. This is actually quite a common problem across the adaptors - we need a good synonym for get()
Having typed all this out, I think get(resource, id) is fine. No need for options. Throw if not found? use a throwOnError option?
See parent issue #887 for details.
The text was updated successfully, but these errors were encountered: