Use POST in Client.fetchImageUrl

Reduces the amount of different request methods we're using.

Not really sure whether this is actually the best option:
- Each request includes `fb_dtsg` and such, so using POST everywhere might be the more secure option?
- But at the same time, the request is more opaque, and harder to debug (urllib3 logs all request urls automatically, so using GET would make that easy)
This commit is contained in:
Mads Marquart
2019-07-01 18:43:00 +02:00
parent b10b14c8e9
commit 8d41ea5bfd

View File

@@ -944,8 +944,8 @@ class Client(object):
"""
image_id = str(image_id)
data = {"photo_id": str(image_id)}
j = self._get(
"/mercury/attachments/photo/", query=data, fix_request=True, as_json=True
j = self._post(
"/mercury/attachments/photo/", data, fix_request=True, as_json=True
)
url = get_jsmods_require(j, 3)