This commit is contained in:
parent
8dc0b49e18
commit
0deb6b4284
@ -8,15 +8,20 @@ class FlareRequests(Session):
|
|||||||
if not CLOUDPROXY_ENDPOINT:
|
if not CLOUDPROXY_ENDPOINT:
|
||||||
return super().request(method, url, params, timeout=timeout, **kwargs)
|
return super().request(method, url, params, timeout=timeout, **kwargs)
|
||||||
|
|
||||||
response = post(
|
post_data = {
|
||||||
CLOUDPROXY_ENDPOINT,
|
|
||||||
json={
|
|
||||||
"cmd": f"request.{method.lower()}",
|
"cmd": f"request.{method.lower()}",
|
||||||
"url": url,
|
"url": url,
|
||||||
"postData": parse.urlencode(params) if params else "",
|
|
||||||
"maxTimeout": timeout * 1000,
|
"maxTimeout": timeout * 1000,
|
||||||
},
|
}
|
||||||
|
|
||||||
|
if params:
|
||||||
|
post_data["postData"] = parse.urlencode(params)
|
||||||
|
|
||||||
|
response = post(
|
||||||
|
CLOUDPROXY_ENDPOINT,
|
||||||
|
json=post_data,
|
||||||
)
|
)
|
||||||
|
|
||||||
solution = response.json()
|
solution = response.json()
|
||||||
|
|
||||||
if "solution" in solution:
|
if "solution" in solution:
|
||||||
|
Reference in New Issue
Block a user