from com.aliyun.api.gateway.sdk import client
from com.aliyun.api.gateway.sdk.http import request
from com.aliyun.api.gateway.sdk.common import constant
host = "http://api.abcde.com"
url = "/huikeapi/A/"
cli = client.DefaultClient(app_key="1234", app_secret="abc")
import json
req_post = request.Request(host=host, protocol=constant.HTTP, url=url, method="POST", time_out=30000)
body = {"customerId": "aaa", "siteKey": "bbb", "beginTime": "2024-06-16", "endTime": "2024-06-17", "interval": "D"}
req_post.set_body(bytearray(source=json.dumps(body), encoding="utf8"))
req_post.set_content_type(constant.CONTENT_TYPE_STREAM)
print(cli.execute(req_post))
上述所言,是阿里云的API网关的SDK来的,我已经打包发上来了。实在弄不懂python里面的post提交的各部分信息都是如何构建的
我需要按照这个python的SDK的方式来知道在易语言 通过 网页_访问 (, , , , , , , , )来post,还望大神们不吝赐教谢谢!
aliyun-api-gateway-demo-sign3.rar
(25.84 KB, 下载次数: 2)