Addheader lets you add a header key/value pair to the data send with an HTTP request. Here's an example:
So:
function GetData() as object
xfer=createobject("roURLtransfer")
xfer.SetUrl("https://api.myserver.com/data")
xfer.SetCertificatesFile("common:/certs/ca-bundle.crt")
xfer.InitClientCertificates()
ba = CreateObject("roByteArray")
ba.FromAsciiString("me@myemailaddress.com":"myAPIKeyblahblah")
xfer.AddHeader("Authorization", "Basic " + ba.ToBase64String())
xfer.AddHeader("X-API-VERSION","3")
results=xfer.GetToString()
'print results
data=parsejson(results)
return data
end function