John
John

Reputation: 3996

Sending data (non-standard) headers in FHIR request

Is there an official recommendation for sending data (e.g. auditing information such as ids, usernames, organizations, etc. making the request) as HTTP headers rather than in the body (FHIR message) of the request? Is this documented somewhere? In other words, is it OK to do this or is it frowned upon (or considered not in spec for a FHIR request)?

Upvotes: 0

Views: 251

Answers (1)

Lloyd McKenzie
Lloyd McKenzie

Reputation: 6803

FHIR REST sits on top of HTTP, so you're free to do whatever HTTP allows. Technologies commonly used with FHIR such as OAuth depend on the use of HTTP headers and in some cases (e.g. sending Provenance with a resource) FHIR defines custom headers. Applications are free to define additional headers, but should be aware that - as with anything that is custom-defined - there will be a cost to getting other systems to support the headers and interoperate and such requirements may reduce the number of systems willing/able to communicate with you. Good practice is to raise the requirement on http://chat.fhir.org and see if there's a "standard" way to meet your need before inventing something custom.

Upvotes: 1

Related Questions