serverAPI = createObject("roUrlTransfer")
serverAPI.setUrl(api_url)
reqHeaders = serverAPI.GetToString()
serverAPI = createObject("roUrlTransfer")
serverAPI.setUrl(api_url)
xport=CreateObject("RoMessagePort")
serverAPI.setport(xport)
msg=wait(0,xport)
if type(msg) = "roUrlEvent"
hedtwo=msg.GetResponseHeaders()
print hedtwo
end if
I know it is pretty late but leaving it here in case someone else comes along the same issue.
GetResponseHeaders() returns the headers if status code of response is between 200 and 300. Maybe that is why you did not see any response headers because your response code was out of these bounds.
If that is the case, you may need to use GetResponseHeadersArray(), according to the docs it returns all headers regardless of the status code.