springmvc servlet-name>
org. springframework . web . servlet .DispatcherServlet servlet-class>
contextConfigLocat ion param-name>
classpath:springmvc -servlet. xml
1
springmvc
/
servlet -mapping>
url = 'http://xxxxxxx.simple.com/xxxxxxxx'data = {
'xxx': 0,
'type': 0,
'status': 3,
'actName': ''}
cookies = {'xxxx': 'xxxxxx',
'uid': 'xxxxxx'}
data['xxx'] = 44
h = requests.get(url, params=data, cookies=cookies, timeout=3000)
# url可以通过h.url查看
requests可以通过params自动拼接
如果是urllib, 没用过, 只知道parse可以拼接参数
>>> import urllib>>> urllib.parse.urlencode({"a": 11, "b": 22})
'a=11&b=22'
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)