mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 08:08:00 +02: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:
|
try:
|
||||||
json_encoded = json.dumps(json_obj)
|
json_encoded = json.dumps(json_obj)
|
||||||
acme_object_validate(json_encoded)
|
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
|
body = response.content
|
||||||
acme_object_validate(body)
|
acme_object_validate(body)
|
||||||
return response.json()
|
return response.json()
|
||||||
|
|||||||
Reference in New Issue
Block a user