Itop REST/JSON services 验证登陆方法
作者:
觉释 | 来源:发表于
2021-08-03 21:25 被阅读0次#!/usr/local/bin/python
#coding:utf-8
import urllib
import urllib2
import json
def http_post():
url="http://100.173.191.60/web/webservices/rest.php?version=1.3"
auth ={"auth_user": "itop" , "auth_pwd": "2134xxzx"}
opr = {"operation": "list_operations"}
oprjson =urllib.urlencode({'json_data': json.dumps(opr)} )
jdata = urllib.urlencode(auth)
jdata = jdata+'&'+oprjson
response = urllib.urlopen(url,jdata)
return response.read()
rep=http_post()
print rep
本文标题:Itop REST/JSON services 验证登陆方法
本文链接:https://www.haomeiwen.com/subject/etxyvltx.html
网友评论