I'm trying to perform a PUT request to a device with a REST API. I'm able to do it successfully with curl via command line, but not BrightSign Player. When I run the following code, I get CURLE_SEND_FAIL_REWIND (-65), and am unsure of how to proceed.
powerURL = "http://x.x.x.x/restapi/relay/outlets/"
outlets = "=0,1"
actionURI = "/state/"
putData = "value=true"
requestURL = powerURL + outlets + actionURI
response = ""
print "Web Switch URL: " + requestURL
request = CreateObject("roUrlTransfer")
request.SetUrl (requestURL)
request.AddHeader("X-CSRF", "x")
request.AddHeader("Content-Type", "application/x-www-form-urlencoded")
request.AddHeader("Accept", "application/json")
request.EnableUnsafeAuthentication(true)
request.SetUserAndPassword("xxx", "xxx")
result = request.PutFromString(putData)
print result