Stream: dotnet
Topic: Accept Header not working
Lars Ewert (Jan 25 2021 at 06:33):
Good Morning Guys,
I´m having an issue when searching for Patients with the fhirClient.
Im requesting against "https://Vonk.fire.ly/R4" Test Server and using the Fhir.R4 library.
Im getting a 406 Not Accepted response back from my backend because the Accept header looks like this:
image.png
im using this code in my Controller for testing purposes at the moment:
image.png
I tried to set the Accept header with the onBeforeRequest and with the searchParameter. Nothing helped me out there...
I hope you know how to solve this problem
Greetings Lars
Brian Postlethwaite (Jan 25 2021 at 07:51):
What does your _client = new... Look like?
The format parameter is _format, and the fhir client itself has another config property to select xml or json, I think it's _client.preferFormat(...) or something like that.
Lars Ewert (Jan 25 2021 at 08:46):
This my implementation in the constructor of the Controller
image.png
i've set the Prefferred format to Json
Ewout Kramer (Feb 16 2021 at 12:19):
@Lars Ewert - we're looking into it.
Ewout Kramer (Feb 16 2021 at 12:50):
@Lars Ewert - can you try using server.fire.ly/R4/
instead of vonk.fire.ly/R4/
?
Ewout Kramer (Feb 16 2021 at 12:50):
Your code should have worked, but this could be a redirect issue.
Last updated: Apr 12 2022 at 19:14 UTC