直接代码:
API=>:POST 'http://ip:port/api/portal/operat' Content-Type: application/x-www-form-urlencoded ac=get_enum_items_by_id id=d6bf6e1bf7f34a59b9a8bca61a7ef9f9 // ajax var settings = { "url": "http://ip:port/api/portal/operate", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/x-www-form-urlencoded" }, "data": { "ac": "get_enum_items_by_id", "id": "858194c401e648d28dc456cd813a9a68" } }; $.ajax(settings).done(function (response) { console.log(response); }); // curl curl --location 'http://ip:port/api/portal/operate' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'ac=get_enum_items_by_id' \ --data-urlencode 'id=858194c401e648d28dc456cd813a9a68' // python import requests url = "http://ip:port/api/portal/operate" payload = 'ac=get_enum_items_by_id&id=5bd737c793e244c5bf7f0e07255bf063' headers = { 'Content-Type': 'application/x-www-form-urlencoded' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
done
标签:Content,www,ip,ac,engine2x,枚举,api,id From: https://www.cnblogs.com/IBPM/p/18543751