①GET
# -*- coding:utf-8 -*-
import requests
def get(url, datas=None):
response = requests.get(url, params=datas)
json = response.json()
return json
注:参数datas为json格式
②POST
# -*- coding:utf-8 -*-
import requests
def post(url, datas=None):
response = requests.post(url, data=datas)
json = response.json()
return json
注:参数datas为json格式
Copyright© 2013-2020
All Rights Reserved 京ICP备2023019179号-8