-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Location header is ignored during create/update methods #24
Comments
This is what FHIR has the |
I was talking to one of EHR Provider on "Prefer" header and their answer is that it is not mandatory according to specs that it should be honored.. But Location header with the reference to newly created Object will always be set.. Is there a design that you have thought of how it should be handled based on whether data is present or use Location header? |
Yes. If the prefer header is set to request a resource but the server doesn't return it, the client should issue a GET request on the Location header before returning. If the prefer header does not specify a resource return, no GET request should be issued. Means there must also be a nice way to set the prefer header.
The Swift client has such an implementation.
… On 17 Feb 2017, at 08:21, bktrinadh ***@***.***> wrote:
I was talking to one of EHR Provider on "Prefer" header and their answer is that it is not mandatory according to specs that it should be honored.. But Location header with the reference to newly created Object will always be set.. Is there a design that you have thought of how it should be handled based on whether data is present or use Location header?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
p.s. |
Hi,
REST specification returns a Location header on successful POST/PATCH and has to be handled appropriately by the caller.. The create()/update() methods are successful with HTTP 201 but the response does not return the actual object reason being the Location header is ignored..
Snip from server.py->post_json()
Snip from fhirabstractresource->create()
Here fhirabstractresource is getting all the headers since it receives a Response object but ignores the response headers. The return response is always None on successful creation since REST does not return any data on success..
Thanks
Trinadh.
The text was updated successfully, but these errors were encountered: