greybeard

Members
  • Content count

    1
  • Joined

  • Last visited

About greybeard

  • Rank
    Forum Newbie
  1. I have a RESTfull service that produces a response based on the MIME type from the HTTP Accepts header. As part of this response, I set the Content-Type header to the representation chosen. Currently, FusionCharts sets this value to text/plain,*/* even though it only accepts XML and JSON. Since the Accepts header specifies */*, the server is free to pick any representation so I chose application/json. I have tried several methods on the chart (e.g., setJSONUrl, setChartDataUrl, etc) but all complain that the XML is not well formed (I can see in the debug window that it is JSON and not XML). Additionally, FusionCharts appears to ignore the Content-Type return by the service, which would be a big clue that it is receiving JSON and not XML. I have two work-arounds for this: Only produce XML. Use another library to fetch the data and then pass it along to FusionCharts. I don't like #1 because it just seems wrong to increase my payload size without some benefit. I don't like #2 because I am not confident that I can find a library that works the same on all platforms and I am not confident that I won't run into some other issue loading JSON data. Any recommendations?