0

My post in a batch request looks like:

<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:media='http://search.yahoo.com/mrss/'
xmlns:batch='http://schemas.google.com/gdata/batch'
xmlns:yt='http://gdata.youtube.com/schemas/2007'>
<batch:operation type='query'/>
<entry>
<id>http://gdata.youtube.com/feeds/api/users/ytUser1</id>
</entry>
<entry>
<id>https://gdata.youtube.com/feeds/api/users/ytUser2</id>
</entry>
<entry>
<id>https://gdata.youtube.com/feeds/api/users/ytUser3</id>
</entry>
</feed>

Except of course with real users and more of them. I am getting the xml feed back fine. Is there a way to request JSON formatted data using POST? I know using ?alt=json in a GET request returns json, but is it possible, and if so how in a POST batch request?

vaene
  • 189
  • 2
  • 12

1 Answers1

0

You should be able to add alt=json to the URL you send your POST to. That works in general for POST requests, i.e. you can send a POST to create a playlist entry, and include alt=json in the URL you POST to, and get back the response body in JSON. I would be surprised if it didn't work for batch POST requests.

Jeff Posnick
  • 53,580
  • 14
  • 141
  • 167
  • you mean link such as http://gdata.youtube.com/feeds/api/videos/batch?alt=json but it is not working – Winston Apr 10 '13 at 16:22