lian

`import requests
from requests.auth import HTTPBasicAuth

if name == "main":
url = 'http://127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/'
headers = {'Content-Type': 'application/json'}
res = requests.delete(url, headers=headers, auth=HTTPBasicAuth('admin', 'admin'))
print (res.content)`

点击查看代码
import requests
from requests.auth import HTTPBasicAuth
 
if __name__ == "__main__":
    url = 'http://127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/'
    headers = {'Content-Type': 'application/json'}
    res = requests.delete(url, headers=headers, auth=HTTPBasicAuth('admin', 'admin'))
    print (res.content)
posted @ 2021-10-27 16:40  synthesis  阅读(47)  评论(0编辑  收藏  举报