From 81a9de3b0bcd141e868978080a43cc122daee418 Mon Sep 17 00:00:00 2001 From: pcain-usgs <pcain@usgs.gov> Date: Tue, 20 Jul 2021 17:21:57 -0600 Subject: [PATCH] specify content type in metadata factory header --- geomagio/metadata/MetadataFactory.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/geomagio/metadata/MetadataFactory.py b/geomagio/metadata/MetadataFactory.py index e000c887f..ec3485624 100644 --- a/geomagio/metadata/MetadataFactory.py +++ b/geomagio/metadata/MetadataFactory.py @@ -25,7 +25,11 @@ class MetadataFactory(object): self.token = token def _get_headers(self): - return {"Authorization": self.token} if self.token else None + return ( + {"Authorization": self.token, "content-type": "application/json"} + if self.token + else None + ) def get_metadata(self, query: MetadataQuery) -> List[Metadata]: if query.id: -- GitLab