NEO4J:自定义标题是否覆盖默认标题?

NEO4J:自定义标题是否覆盖默认标题?,neo4j,header,graph-databases,neo4jclient,custom-headers,Neo4j,Header,Graph Databases,Neo4jclient,Custom Headers,我目前正试图在我的Cypher请求的头中添加一个字段,告诉负载平衡器它是写请求还是读请求,以便它在Master或Slave Neo4j实例上引导查询 HttpClientWrapper clientWrapper = new HttpClientWrapper(ConfigurationManager.AppSettings["Neo4jUserName"], ConfigurationManager.AppSettings["Neo4jPassword"]); Uri uri = new U

我目前正试图在我的Cypher请求的头中添加一个字段,告诉负载平衡器它是写请求还是读请求,以便它在Master或Slave Neo4j实例上引导查询

HttpClientWrapper clientWrapper = new HttpClientWrapper(ConfigurationManager.AppSettings["Neo4jUserName"], ConfigurationManager.AppSettings["Neo4jPassword"]);

Uri uri = new Uri(ConfigurationManager.AppSettings["Neo4jClient"]);
GraphClient client = new GraphClient(uri, clientWrapper);
client.JsonConverters.Add(new CoordinateConverter());
client.Connect();
...        
NameValueCollection collection = new NameValueCollection();
collection.Add("X:Write", "1");
...
client.Cypher.CustomHeader(collection)...
但在执行查询时,我会遇到如下异常:

System.FormatException:“标头名称格式无效。”

我的问题是,.CustomHeader(集合)是否覆盖标准标题,而不是仅添加字段X:Write? 我正在努力寻找有关CustomHeader的文档以及它应该如何工作

提前感谢您阅读我的文章


编辑:以下是我找到的一些代码示例,应该可以使用:

错误是我无法在标题名称中使用“:”,将名称更改为“IsWrite”解决了问题