You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Function for executing HTTP request (channel creation)
defadd_channel(vxg_address, Lkey, url, id):
# HTTP header. Indicates the MIME document type (json) as well as the authorization key
headers= {
'accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'LKey %s'%str(Lkey),
}
data='{ "name": "Test_relay", "rec_mode": "on", "relay_to":"%s", "source": { "url": "%s" } }'% (str(id), str(url)) # Data that must be transferred to create a channel
address='http://'+str(vxg_address)+':83/api/v3/channels/'# Server address
# Exclusion block. If a request error occurs during the sending of the request (for example, the server is not available), the program displays the error status and terminates the execution.