Stream: implementers
Topic: search using POST
Jens Villadsen (Sep 03 2019 at 11:31):
Does the spec support search operations using POST (_search) where the parameters are contained in the body instead of being in the query string?
Jose Costa Teixeira (Sep 03 2019 at 11:33):
http://build.fhir.org/http.html#search
says so:
in addition to the get based search method above, servers that support search SHALL also support a POST based search
Jose Costa Teixeira (Sep 03 2019 at 11:34):
(is that the question?)
Jens Villadsen (Sep 03 2019 at 11:38):
@Jose Costa Teixeira the spec mentions the following: POST [base]/[type]/_search{?[parameters]{&_format=[mime-type]}}
- it does not state that the parameters should be in the body
Jens Villadsen (Sep 03 2019 at 11:38):
which is my question. Is it allowed to have the query parameters in the body?
Jens Villadsen (Sep 03 2019 at 11:44):
It seems like to be the case ... but it could be stated more explicitly
Jose Costa Teixeira (Sep 03 2019 at 11:44):
they are sent as an application/x-www-form-urlencoded submission for a POST
Content-Type: application/x-www-form-urlencoded
param1=value¶m2=value
Jens Villadsen (Sep 03 2019 at 11:46):
got it ... thx
Jens Villadsen (Sep 03 2019 at 11:47):
that works
Vadim Peretokin (Sep 03 2019 at 13:24):
Would defeat the point of adding POST if it didn't work that way, right :)
Jens Villadsen (Sep 03 2019 at 14:24):
it could have been provided as a Parameter resource ... but x-www-form-urlencoded works
Last updated: Apr 12 2022 at 19:14 UTC