Stream: implementers
Topic: Only using POST for search
jassy (Mar 31 2017 at 00:12):
In http://build.fhir.org/http.html#search, it describes POST can be used for search. Does it still conform FHIR standard if a FHIR service only support POST search (doesn't support GET search)?
Lloyd McKenzie (Mar 31 2017 at 00:36):
Based on the wording in the spec, servers are expected to support both approaches
jassy (Apr 01 2017 at 14:57):
Thanks
Ken Sinn (Mar 06 2018 at 15:45):
@Lloyd McKenzie Resurrecting an old thread here. What exactly does the following mean?
"Because of the way that some user agents and proxies treat GET and POST requests, in addition to the get based search method above, servers that support search SHALL also support a POST based search" -- could someone elaborate on the "the way some user agents and proxies treat GET and POSTS requests"? "SHALL" is pretty strong conformance wording, and most implementations seem to support GET without supporting POST.
Lloyd McKenzie (Mar 06 2018 at 15:47):
Some tools and organizations refuse to allow patient-identifiable healthcare data to appear in URLs. (The usefulness of such policies is questionable, but that's a separate issue.) Any system that doesn't support POST is non-conformant. If you think that's an issue, you can certainly raise it as a change request/ballot issue.
Ken Sinn (Mar 06 2018 at 15:58):
Thank you for the quick response, Lloyd.
Kevin Olbrich (Mar 06 2018 at 18:46):
There are also probably cases where you can't reasonably fit your search query definition into the length limits of a URL (it's ~2000 characters), in that scenario you might want to POST with the query defined in the body instead. This is the way that GraphQL does this... http://graphql.org/learn/serving-over-http/#post-request.
Lloyd McKenzie (Mar 06 2018 at 18:47):
Yes, that's true too.
Michael Lawley (Mar 07 2018 at 23:47):
More specifically, any system that supports search but doesn't support POST based search is non-conformant.
Ken Sinn (Sep 07 2018 at 13:58):
@Lloyd McKenzie Can I ask the converse? If an implementation only supports POST but not GET, is it FHIR-conformant?
Lloyd McKenzie (Sep 07 2018 at 17:36):
Servers must support both. Clients can support whichever they prefer that will work for their needs.
Last updated: Apr 12 2022 at 19:14 UTC