GitHub user ZhiXIaox closed the discussion with a comment: how to use python 
request call aiflow?

import requests

# 定义Aiflow API的端点
api_url = "http://your-aiflow-server/api/endpoint";

# 定义请求头和数据
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY"
}
data = {
    "param1": "value1",
    "param2": "value2"
}

# 发送POST请求
response = requests.post(api_url, headers=headers, json=data)

# 处理响应
if response.status_code == 200:
    result = response.json()
    print("请求成功,结果:", result)
else:
    print("请求失败,状态码:", response.status_code)

GitHub link: 
https://github.com/apache/airflow/discussions/44467#discussioncomment-11443590

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to