-
1. Re: Unable to URLRequest in AIR for Android (passing headers)
DanelKirch Jan 10, 2011 5:50 AM (in response to DanelKirch)Hello again,
i think i got it solved.
What exactly was the problem or what i did, im not quite sure....
but the thing i tried was to pass on ONLY cookie to the request (before i passed entire received header, probably what made it all
dis-function)
so to be clear here is a example of this "solution"
var header is returned header from the site after log in
i just look if any names there has ookie in it... (there should be Set-cookie)
if there is, i take its value and split it är new-line (if there is any, probably not, but anyway... )
when i got value... i simply push that value into requestHeaders under Cookie.
for(var hi:* in header){ if(header[hi].name.indexOf('ookie') != -1){ var va:String = String(header[hi].value).split('\n').join(''); req.requestHeaders.push(new URLRequestHeader('Cookie',va)) } }not so pretty to look at, but as told... just a test
it seemes to work, few times is get data returned which seems to be null... not sure why.
hope this helps anyone
