Expand my Community achievements bar.

HTTP Service HTTP Headers

Avatar

Former Community Member
I am currently writing a UI into a Rails backend. The first
task is to pass the user and password and retrieve the
authentication token back.



This works great after finding out Firefox and Safari sent
different requests.



The next task is to use this token to authenticate when
updating or adding new records.



I have the issue that I have base 64 encoded the token and
tried very unsuccessfully to set the AUTHORIZATION header with the
value.



Im guessing that I am doing something stupid but I cannot
find any detailed docs on how to set HTTP headers.



Which brings me onto the point of how do you also check HTTP
status on return.



Hope somebody can shed some light.
1 Reply

Avatar

Level 2
Hi,



Check out the headers property of HTTPService (
http://livedocs.adobe.com/flex/3/langref/mx/rpc/http/HTTPService.html#headers)




And URLRequestHeader if you are using a URLLoader.



But to pass the authorization header, the latest version of
the flash player requires you to have it specified in the cross
domain file:




http://kb.adobe.com/selfservice/viewContent.do?externalId=kb403184&sliceId=1



For HTTP Status, check out
this
link