Creating a Binary resource fails using the client

17 views
Skip to first unread message

Steve Borman

unread,
Sep 14, 2023, 1:02:17 PM9/14/23
to FHIR DOTNET
I have created a Binary resource and if I use the ToJson() method the resulting Json is:

{
    "resourceType": "Binary",
    "contentType": "application/pdf",
    "data": "H4sIAAAAAAAEAOy7V4vE3NYm9le....." (I've shortened this for visibility)
}

If I post this message in Postman the resource is created.

If I use 
var uploadResult = await fhirClient.CreateAsync(binary);
It fails with the error Hl7.Fhir.Rest.FhirOperationException: 'Operation was unsuccessful because of a client error (UnsupportedMediaType).

Any ideas?
Reply all
Reply to author
Forward
0 new messages