aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat/api_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'fatcat/api_client.py')
-rw-r--r--fatcat/api_client.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/fatcat/api_client.py b/fatcat/api_client.py
index e371b727..0c9336ee 100644
--- a/fatcat/api_client.py
+++ b/fatcat/api_client.py
@@ -12,13 +12,10 @@ class FatCatApiClient:
def get(self, path):
return self.session.get(self.host_url + path)
- def post(self, path, data=None, headers=None):
- hdrs = {"content-type": "application/json"}
- if headers:
- hdrs.update(headers)
- #if type(data) == dict:
- # data = json.dumps(data, indent=None).encode('utf-8')
- return self.session.post(self.host_url + path, json=data, headers=hdrs)
+ def post(self, path, data=None):
+ headers = {"content-type": "application/json"}
+ return self.session.post(self.host_url + path, json=data,
+ headers=headers)
def import_crossref_file(self, json_file):
eg = self.new_editgroup()