mirror of
https://github.com/certbot/certbot.git
synced 2026-01-24 19:22:07 +03:00
Set the content-type header and use POST, which the ACME spec requires
This commit is contained in:
@@ -478,7 +478,11 @@ class Client(object):
|
||||
try:
|
||||
json_encoded = json.dumps(json_obj)
|
||||
acme_object_validate(json_encoded)
|
||||
response = requests.get(self.server_url, data=json_encoded)
|
||||
response = requests.post(
|
||||
self.server_url,
|
||||
data=json_encoded,
|
||||
headers={"Content-Type": "application/json"},
|
||||
)
|
||||
body = response.content
|
||||
acme_object_validate(body)
|
||||
return response.json()
|
||||
|
||||
Reference in New Issue
Block a user