Skip to content

Commit 785a0e7

Browse files
committed
Updated Readme for the JS client
1 parent e340d4e commit 785a0e7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ Please follow the [installation](#installation) instruction and execute the foll
3939
var Manticoresearch = require('manticoresearch');
4040
var client = Manticoresearch.ApiClient();
4141
client.basePath="http://localhost:9308";
42+
/*
43+
If a custom http agent is needed, e.g., to enable keep-alive connections, the 'requestAgent' option can be set to override 'superagent' agent instance used by default:
44+
client.requestAgent = new http.Agent({
45+
keepAlive: true,
46+
maxSockets: 1,
47+
keepAliveMsecs: 1000
48+
});
49+
*/
4250

4351
var api = new Manticoresearch.IndexApi(client)
4452
var body = ["'{\"insert\": {\"index\": \"test\", \"id\": 1, \"doc\": {\"title\": \"Title 1\"}}},\\n{\"insert\": {\"index\": \"test\", \"id\": 2, \"doc\": {\"title\": \"Title 2\"}}}'"]; // {String}

0 commit comments

Comments
 (0)