Skip to main content
Solved

does the api return jsonp for an ajax call?


Forum|alt.badge.img+5
  • New Contributor
  • 3 replies

Has anyone verified that the jss api returns jsonp for a cross-domain, browser-based ajax request?

I can return json objects from the api with a REST client, but no matter what I try, I can't get a javascript ajax request to return anything other than xml.

If anyone has this working, would you mind sharing the bit of your .ajax() or XMLHttpRequest() or whatever you are using that is enabling jsonp?

Best answer by ebauer

As of 5/22/2016 per jss tech support:

"We do support ajax queries, and that right now there is a bug with headers in the JSS that's causing it to only return XML."

this bug seems to only apply to javascript ajax calls.

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+7
  • Contributor
  • 70 replies
  • April 27, 2016

I have had some issues with the format that the API returns. In my case I had to add a header to specify xml. I think the header (in Python) for JSON is

opener.addheaders.append(('Accept', 'application/json'))

To specify xml I used

opener.addheaders.append(('Accept', 'application/xml'))

Hope this helps

Regards
Graeme


Forum|alt.badge.img+5
  • Author
  • New Contributor
  • 3 replies
  • Answer
  • May 5, 2016

As of 5/22/2016 per jss tech support:

"We do support ajax queries, and that right now there is a bug with headers in the JSS that's causing it to only return XML."

this bug seems to only apply to javascript ajax calls.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings