set Content-Type

This commit is contained in:
virusdefender 2016-10-25 23:08:17 +08:00
parent 41b1396a23
commit 3a6d0cb56a

View File

@ -20,7 +20,8 @@ class JudgeServerClient(object):
self.server_base_url = server_base_url.rstrip("/")
def _request(self, url, data=None):
kwargs = {"headers": {"X-Judge-Server-Token": self.token}}
kwargs = {"headers": {"X-Judge-Server-Token": self.token,
"Content-Type": "application/json"}}
if data:
kwargs["data"] = json.dumps(data)
try: