I'm searching for a way to parse multiple API requests using a postman snippet in python.
The following works:
import http.client
conn = http.client.HTTPSConnection("webapi.teamviewer.com")
payload = "remotecontrol_id=rxxxxxxxx&groupid=g18932019&alias=test1%20api&password=xxxxxx"
headers = {
'authorization': "Bearer xxxxxxx-xxxxxxxxxxx",
'cache-control': "no-cache",
'postman-token': "xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
'content-type': "application/x-www-form-urlencoded"
}
conn.request("POST", "/api/v1/devices", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
How can I do this with multiple payloads.?