多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
~~~ import urllib, urllib2, sys host = 'http://www.api51.cn' path = '/api/smsApi/send' method = 'POST' querys = '' bodys = {} url = host + path bodys['mobile'] = '13288888888' bodys['params'] = '1024,张三' bodys['sign'] = '网极科技' bodys['token'] = 'token' bodys['tpl_id'] = '46792' post_data = urllib.urlencode(bodys) request = urllib2.Request(url, post_data) //根据API的要求,定义相对应的Content-Type request.add_header('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8') response = urllib2.urlopen(request) content = response.read() if (content): print(content) ~~~