I need to execute a POST
call to an API inside a SQL Server Job using Python.
This is the Python script:
import requests
url = 'https://www.googleapis.com/qpxExpress/v1/trips/searchkey=mykeyhere'
payload = open("request.json")
headers = {'content-type': 'application/json', 'Accept-Charset': 'UTF-8'}
r = requests.post(url, data=payload, headers=headers)
Any clue how to do this?
question from:
https://stackoverflow.com/questions/65924522/sql-server-agent-job-calling-curl-using-python 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…