Thanks Rick,

I am in the process of developing API to integrate with the .NET RESTful 
servicing and there are two things I am would like to do.
1) On all GET and POST calls to RESTful endpoints attached an "authentication" 
header with two name value pairs, i.e. a key and token.
2) I want to be able to handle a 400 Bad Request error (and other 400 errors) 
and parse through a JSON payload to allow Flex to determine how to proceed. In 
the past we have forced a 200 status with a JSON payload but would like to if 
possible handle 400 errors...

Dan

-----Original Message-----
From: Rick Winscot [mailto:rick.wins...@gmail.com] 
Sent: Tuesday, February 05, 2013 10:58 AM
To: dev@flex.apache.org
Subject: Re: HTTPService Response Headers

Dan.

If you are not using a proxy service like BlazeDS... anything other than an 
HTTP200 is going to cause your Flex application fits. If you are looking for 
the notion of a 'successful failure' where an operation completed (e.g. a 
partial save) but had errors. You'll need to implement the semantics of that 
condition yourself - Flex is relegated to either a result or fault.

If you've considered pushing elements into HTTP headers... remember that custom 
HTTP request headers are only supported for POST requests, not for GET 
requests. 

http://verveguy.blogspot.com/2008/07/truth-about-flex-httpservice.html

Additionally, heavy restrictions have been placed on HTTP headers in Flash 
Player 9.0+ and may get worse. So... your mileage will depend on which headers 
you want to touch.

http://helpx.adobe.com/flash-player/kb/authorization-header-request-flash-player.html

If you have a concrete use-case, we might be able to hammer out an approach 
that works reliably. What exactly did you have in mind?

Cheers,

Rick Winscot



On Tuesday, February 5, 2013 at 12:22 PM, Dan Nailor wrote:

> Hello,
> I am looking to find out if there is anything in the works to allow the 
> HTTPService response headers to be interrogated beyond successful and 
> unsuccessful calls? From what I understand this is not possible with the 
> current class and may be a limitation of some browsers.
> 
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/
> rpc/http/HTTPService.html 
> http://blogs.adobe.com/kiwi/2006/07/making_http_calls_in_actionscr.htm
> l (Response Headers)
> 
> Thanks!
> 
> Dan
> 
> This transmission may contain information that is privileged, confidential, 
> and/or exempt from disclosure under applicable law. If you are not the 
> intended recipient, you are hereby notified that any disclosure, copying, 
> distribution, or use of the information contained herein (including any 
> reliance thereon) is STRICTLY PROHIBITED. If you received this transmission 
> in error, please immediately contact the sender and destroy the material in 
> its entirety, whether in electronic or hard copy format. 

Reply via email to