import requests
class HTTP:
@staticmethod
def get(surl: object, return_json: object = True) -> object:
r = requests.get(url)
# restful
# json
if r.status_code != 200:
return {} if return_json else ""
return r.json() if return_json else r.text
添加回答
举报
0/150
提交
取消