nodejs-docs-samples icon indicating copy to clipboard operation
nodejs-docs-samples copied to clipboard

Missing header for FHIR examples

Open nate-watkins opened this issue 9 months ago • 1 comments

In which file did you encounter the issue?

healthcare/fhir/createFhirResource.js

Did you change the file? If so, how?

    version: 'v1',
    auth: new google.auth.GoogleAuth({
      scopes: ['https://www.googleapis.com/auth/cloud-platform'],
    }),
    headers: {'Content-Type': 'application/fhir+json'},
+   responseType: 'json',
   }
}

Describe the issue

Line 58 expects the return type to be json. If left unspecified, it returns an array buffer that needs to be converted. This applies to many of the FHIR examples. For others who may come across this, I believe there are other issues with the TS types in the client library.

nate-watkins avatar May 14 '24 15:05 nate-watkins