Thank You Chris. I am adding it to the function below (from url.brs) and reading the response from a header echo URL Mark supplied.
If i give "Expect" a value of "100-continue" it echos back, with no value (as below) it doesn't.
If I add the header "Accept" (over-riding the internal Roku-added header) and make the value "application/x-www-form-urlencoded" it echos back. (the roku value is normally */*) .
Neither of these will echo
urlobj.AddHeader("Content-Type","application/x-www-form-urlencoded")
urlobj.AddHeader("Content-Length", "0")
I can't see any reason why its not coming back, or being added.
Function http_prep(method="" As String)
' this callback allows just-before-send
' mods to the request, e.g. timestamp
if isfunc(m.callbackPrep) then m.callbackPrep()
m.status = 0
m.response = ""
urlobj = CreateObject("roUrlTransfer")
if type(m.port)<>"roMessagePort" then m.port = CreateObject("roMessagePort")
urlobj.SetPort(m.port)
urlobj.SetCertificatesFile("common:/certs/ca-bundle.crt")
urlobj.EnableEncodings(true)
urlobj.AddHeader("Expect","")
urlobj.AddHeader("Content-Type","application/x-www-form-urlencoded") ''''
urlobj.AddHeader("Content-Length", "0") ''''
url = m.GetUrl()
urlobj.SetUrl(url)
if m.method<>"" and m.method<>method then urlobj.SetRequest(m.method)
HttpActive().replace(m,urlobj)
m.timer.mark()
End Function
Kinetics Screensavers