|
@@ -35,10 +35,8 @@ def getAttachDealInterface(_data,_type,path="",restry=1,kwargs={},url=interface_
|
|
if len(kwargs.keys())>0:
|
|
if len(kwargs.keys())>0:
|
|
_json.update(kwargs)
|
|
_json.update(kwargs)
|
|
headers = {"Content-Type":"application/json"}
|
|
headers = {"Content-Type":"application/json"}
|
|
- if session is not None:
|
|
|
|
|
|
+ with requests.Session() as session:
|
|
_resp = session.post(url,data=_json,timeout=timeout)
|
|
_resp = session.post(url,data=_json,timeout=timeout)
|
|
- else:
|
|
|
|
- _resp = requests.post(url,data=_json,timeout=timeout)
|
|
|
|
|
|
|
|
if _resp.status_code==200:
|
|
if _resp.status_code==200:
|
|
_result = json.loads(_resp.content.decode())
|
|
_result = json.loads(_resp.content.decode())
|