Add support for altering the HTTP verb in request mutations
Opened this issue · 0 comments
The proposal is to add the ability to alter the HTTP Verb from a GET to POST during request mutation. The GET request faces limitations when we have a request with multiple query parameters which can be circumvented using POST payloads.
One benefit of this to to avoid the URI too large exception when adding extra URL params at the gateway level (e.g. location identifiers)
To avoid any possible side effects we probably want to replace the entire request with a newly constructed one of the target HTTP verb. Ideally we want to
- Construct a POST payload/body
- strip/move all query parameters to the payload
- Make a POST style request to the FHIR Server.
It is worth noting that some FHIR client implementations e.g. the HAPI FHIR generic client internally implement this switch when it detects that request url is too long (over 8000 characters) , see https://hapifhir.io/hapi-fhir/docs/client/generic_client.html