FHIR Chat · search using POST · implementers

Stream: implementers

Topic: search using POST


view this post on Zulip 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?

view this post on Zulip 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

view this post on Zulip Jose Costa Teixeira (Sep 03 2019 at 11:34):

(is that the question?)

view this post on Zulip 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

view this post on Zulip Jens Villadsen (Sep 03 2019 at 11:38):

which is my question. Is it allowed to have the query parameters in the body?

view this post on Zulip Jens Villadsen (Sep 03 2019 at 11:44):

It seems like to be the case ... but it could be stated more explicitly

view this post on Zulip 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&param2=value

view this post on Zulip Jens Villadsen (Sep 03 2019 at 11:46):

got it ... thx

view this post on Zulip Jens Villadsen (Sep 03 2019 at 11:47):

that works

view this post on Zulip Vadim Peretokin (Sep 03 2019 at 13:24):

Would defeat the point of adding POST if it didn't work that way, right :)

view this post on Zulip 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