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