On Dec 2, 2015 9:37 AM, "Alex Harui" <aha...@adobe.com> wrote:
>
>
>
> On 12/2/15, 1:37 AM, "Christofer Dutz" <christofer.d...@c-ware.de> wrote:
>
> >Actually I don't think you need to add anything to BlazeDS I think the
> >Spring-Flex guys for example already did that work.
> >
> >I know that you can configure Spring MVC Rest Controllers to
> >auto-serialize data depending on the Accept header of a request. So if
> >xml is requested, a xml response is sent back, if json is requested, json
> >is returned.
>
> That's cool, but doesn't both this approach and Om's approach require
> different client code in the SWF version vs the HTML/JS version?  You'd
> have to set the Accept header or resultFormat based on whether you are
> running the SWF version or JS version.

That is correct.   We already do different things in flash version of
HttpService and JS version of HttpService.  Setting the Accept header or
querystring param is just another difference.

When it comes to accessing the data structure of the loaded AMF/JSON
object, there should be no code differences.


  Is there a way to use some other
> header that has a better chance of being different between the two
> versions? Then the cross-compile would "just work".  Or should the FlexJS

> HTTPService have different Accept header defaults in the SWF code vs the

> JS code?
>

One way I can think of is to extend HTTPService which would set the default
accepts for as and js versions.
> -Alex

>

Reply via email to