Python 中可以使用 requests
库来发送 HTTP POST 请求。下面是一个示例:
import requests
url = "https://www.example.com/api/create_user"
data = {"username": "user1", "email": "user1@example.com"}
response = requests.post(url, data=data)
print(response.text)
这个例子中,我们向 `https://www.example.com/api/create