mirror of
https://github.com/QingdaoU/JudgeServer.git
synced 2024-12-28 21:31:43 +00:00
set Content-Type
This commit is contained in:
parent
41b1396a23
commit
3a6d0cb56a
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user