Skip to content

Commit b1d7082

Browse files
committed
fix(fhir): add missing Content-Type header to POST request
1 parent 7f13b79 commit b1d7082

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

healthcare/fhir/searchFhirResourcesPost.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ const main = (
2828
const searchFhirResourcesPost = async () => {
2929
const auth = new GoogleAuth({
3030
scopes: 'https://www.googleapis.com/auth/cloud-platform',
31-
// Set application/fhir+json header because this is a POST request.
32-
headers: {'Content-Type': 'application/fhir+json'},
3331
});
3432
// TODO(developer): uncomment these lines before running the sample
3533
// const cloudRegion = 'us-central1';
@@ -50,6 +48,9 @@ const main = (
5048
const response = await client.request({
5149
url,
5250
method: 'POST',
51+
headers: {
52+
'Content-Type': 'application/fhir+json',
53+
},
5354
params,
5455
responseType: 'json',
5556
});

0 commit comments

Comments
 (0)