精易论坛
标题:
请教python的阿里云SDK里面的post转为易语言的post?
[打印本页]
作者:
gnmachang
时间:
2024-6-21 20:06
标题:
请教python的阿里云SDK里面的post转为易语言的post?
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)
2024-6-21 20:06 上传
点击文件名下载附件
下载积分: 精币 -2 枚
作者:
gnmachang
时间:
2024-6-21 21:30
有大佬指教一下吗
作者:
chendipang
时间:
2024-6-22 00:11
根据官方的文档写就是了
作者:
gnmachang
时间:
2024-6-22 13:00
chendipang 发表于 2024-6-22 00:11
根据官方的文档写就是了
看不懂呢大哥指教一下谢谢
作者:
gnmachang
时间:
2024-6-22 16:44
求解求解各位大佬
作者:
anyuezhiji
时间:
2024-7-12 23:28
读懂代码翻译下就行,或者你抓个post的包看下就懂了
作者:
xiassang
时间:
2024-9-6 20:59
你这是求助也是在赚别人金币
欢迎光临 精易论坛 (https://125.confly.eu.org/)
Powered by Discuz! X3.4