views:

5

answers:

0

I'm working on a project built in Flash AS2.

One of the things I need to do is load JSON data.

In the past, I've had no problem with this - LoadVars works just fine.

However, on this project, the JSON service that I'm calling requires the http request to include an ACCEPT header with "application/json".

LoadVars has an addRequestHeader method that allows me to add or change HTTP request headers, but according to the documentation, those headers are only sent with POST actions.

Of course, in my case, the JSON service only allows GET requests.

I tried using addRequestHeader anyway, but the header is not sent.

Is there some way around this?

(Of course, I could rebuild the application using AS3, which allows me to use URLLoader and URLRequest, but the application has WAY to much legacy AS2 code...)

Many thanks in advance for any advice or insight.