Stream: hapi
Topic: Receive Binary Stream with HAPI Client
Conrad Chmara (Jun 22 2017 at 13:36):
Is there an easy way to retrieve a binary stream using the HAPI Client?
My use case is that I am trying to retrieve an attachment that is located on a hosted FHIR server that will only return a stream not a Binary bundle. I would prefer not to create another client within the project just to retrieve a streamed item (document, image, pdf...).
Also how do you use the binary get resource to retrieve a stream. When using something like this:
Binary binary = client.read().resource(Binary.class).withUrl(queryString).execute();
I will receive an error for invalid content-type. Is there a way to set the Binary to only accept a stream and not send the Accept header?
Any help would be greatly appreciated.
-Conrad
Last updated: Apr 12 2022 at 19:14 UTC