node-solr-smart-client
Version:
A node solr-client smart constructor
21 lines (16 loc) • 579 B
JavaScript
/**
* Created by jijordre on 03.06.15.
*/
var RESTClient = require('node-rest-client').Client;
var options = {
// customize mime types for json or xml connections
//(in your case with a space between type and charset)
mimetypes: {
json: ["application/json", "application/json; charset=utf-8"],
xml: ["application/xml", "application/xml; charset=utf-8"]
}
};
var restClient = new RESTClient(options);
restClient.get('http://htz-slr02:8983/solr/admin/collections?action=LIST&wt=json', function (data, response) {
var breakHere = true;
});