4 ms·
json=true to specify the content type. Ideally, this should be from the accept header, but at the very least it should be possible to only specify one content t
by nl 15y ago
json=true to specify the content type. Ideally, this should be from the accept header, but at the very least it should be possible to only specify one content type. Right now, I can specify json=true&xml=true.
Specifying content type as a parameter this makes debugging so much easier that I think it is worth it.
I agree with your other points. Specifically, the output type should be done the same way Solr does it: http://wiki.apache.org/solr/CoreQueryParameters#wt http://wiki.apache.org/solr/CoreQueryParameters#wt
- bluesmoon 15y agoI think he meant that it should have been type=json or type=xml instead of json=true/xml=true. The former has been pretty standard practice with REST APIs as far back as I can remember (2005 at least), as an alternative when Accept headers weren't possible.
- petrohi 15y agoYes, type=json|jsonp|xml|csv would work. We would just need an extra parameter for JSONP to specify the name of the callback function.