get 参数提 params={}
其他 data={}
get /post /delete /put
(1)get:
/ci.ytesting.com/api/3school/school_classes?vcode=<vcode>&action=list_classes_by_schoolgrade&gradeid=<gradeid> HTTP/1.1
+
requests.get(url,params={})
=
import requests
payload={'Content-Type':'application/json','vcode':******','action':'list_classes_by_schoolgrade'}
z=requests.get('http://ci.ytesting.com/api/3school/school_classes',params=payload)
print(z.json())
(2)post
requests.post(url,data={})
item={'vcode':'*****','action':'add','grade':4,'name':'banji','studentlimit':40}
html=requests.post('http://ci.ytesting.com/api/3school/school_classes',data=item)
print(html.json())