第一种是使用Get方法来传递字典数据

json_id=[]
params = {'j4jgr2xu':'',
    'max':pin_id,
    'limit':'20',
    'wfl':'1'}
rsp= requests.get(url,params=params,headers=headers)
rsp_json = json.loads(rsp.text)

第二种是使用Post方法来传递字典数据

data = {"name":"1","type":1,"userGroupId":int(group_id),"status":'true',"serviceDomainId":int(doamin_id),"detailAccess":{"loginName":"1","allowAuth":["portal","eap"],"nameIndex":1,"allowMac":[""],"nameLength":6,"pwdLength":6,"hasPrefix":'true',"hasIndex":'true',"hasRandom":'false',"isRandom":'false'},"detailService":{"validity":-1,"validityUnit":1,"dataQuotaInMB":-1}}
rsp1 = requests.post(url,headers=headers,data=json.dumps(data)).text
print(rsp1)