Closed luis901101 closed 7 months ago
I don't have any problem leaving out the _pretty. The problem is that I've certainly used FHIR servers where the default was XML (as XML was the original FHIR format, and a lot of the older FHIR developers seem to prefer it). This is especially true if you expand from FHIR into FHIR Mapping or CQL. I appreciate the input, and like I said, happy to change the _pretty, I agree that's definitely not necessary. But I'll have to think about the _format.
Hi, first of all thanks for this amazing package 👌.
This PR is only to make the general parameters
_format
andpretty
optional, so the request doesn't include these params unless the dev states it. The idea is to keep the request as simple as possible having only what's necessary, moreover most of the FHIR backends (if not all) already uses json responses by default, so no need to specify it, it should be enough to state in the documentation that this package doesn't support XML. By the way I recently had a bad experience with Medplum API which didn't support_format
nor_pretty
general params and the requests werebad request error 400
, check here: Medplum #3975, despite they already fixed it, I still consider letting these params as optional is better.I leave it for your consideration.